You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@teaclave.apache.org by GitBox <gi...@apache.org> on 2021/08/02 15:56:44 UTC

[GitHub] [incubator-teaclave] ya0guang opened a new pull request #535: Add TVM MNIST example and related tests for Teaclave

ya0guang opened a new pull request #535:
URL: https://github.com/apache/incubator-teaclave/pull/535


   ## Description
   
   - Enlarge enclave stack for larger tasks
   - Enlarge WAMR stack and heap for larger tasks
   - Add TVM MNIST example and related tests
   
   Fixes # (issue)
   
   ## Type of change (select or add applied and delete the others)
   
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
   - [ ] API change with a documentation update
   - [X] Additional test coverage
   - [ ] Code cleanup or just sync with upstream third-party crates
   
   ## How has this been tested?
   
   ## Checklist
   
   - [X] Fork the repo and create your branch from `master`.
   - [X] If you've added code that should be tested, add tests.
   - [ ] If you've changed APIs, update the documentation.
   - [ ] Ensure the tests pass (see CI results).
   - [ ] Make sure your code lints/format.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave] mssun commented on a change in pull request #535: Add TVM MNIST example and related tests for Teaclave

Posted by GitBox <gi...@apache.org>.
mssun commented on a change in pull request #535:
URL: https://github.com/apache/incubator-teaclave/pull/535#discussion_r681284314



##########
File path: docker/teaclave-rt.ubuntu-1804.Dockerfile
##########
@@ -19,7 +19,8 @@ RUN curl -fsSL  https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.
 RUN apt-get update && apt-get install -q -y \
     libsgx-launch=$VERSION \
     libsgx-urts=$VERSION \
-    libsgx-quote-ex=$VERSION
+    libsgx-quote-ex=$VERSION \
+    libsgx-uae-service=$VERSION

Review comment:
       Can you squash your commits in one and rebase on the latest master HEAD? This change has been merged.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave] mssun commented on pull request #535: Add TVM MNIST example and related tests for Teaclave

Posted by GitBox <gi...@apache.org>.
mssun commented on pull request #535:
URL: https://github.com/apache/incubator-teaclave/pull/535#issuecomment-892336971


   Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave] mssun commented on a change in pull request #535: Add TVM MNIST example and related tests for Teaclave

Posted by GitBox <gi...@apache.org>.
mssun commented on a change in pull request #535:
URL: https://github.com/apache/incubator-teaclave/pull/535#discussion_r681430156



##########
File path: docker/build.ubuntu-1804.sgx-2.14.Dockerfile
##########
@@ -82,6 +82,20 @@ RUN apt-get update && apt-get install -q -y \
 
 RUN pip3 install pyopenssl toml cryptography yapf requests Pillow
 
+# install TVM dependencies
+RUN apt-get install -q -y \
+    lvm-10 \

Review comment:
       `lvm` -> `llvm`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave] mssun merged pull request #535: Add TVM MNIST example and related tests for Teaclave

Posted by GitBox <gi...@apache.org>.
mssun merged pull request #535:
URL: https://github.com/apache/incubator-teaclave/pull/535


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave] mssun commented on a change in pull request #535: Add TVM MNIST example and related tests for Teaclave

Posted by GitBox <gi...@apache.org>.
mssun commented on a change in pull request #535:
URL: https://github.com/apache/incubator-teaclave/pull/535#discussion_r681189395



##########
File path: examples/python/wasm_tvm_mnist_payload/Cargo.toml
##########
@@ -0,0 +1,40 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+[package]
+name = "mnist"
+version = "0.1.0"
+edition = "2018"
+license = "Apache-2.0"
+
+[profile.release]
+lto = true
+opt-level = 's'
+
+[lib]
+crate-type = ['cdylib']
+
+[dependencies]
+teaclave_context = {path = "../../../sdk/payload/wasm/teaclave_context/"}
+# image = "0.23"
+image = "0.20"
+# ndarray = "0.15"

Review comment:
       Remove these unused crates.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave] mssun commented on a change in pull request #535: Add TVM MNIST example and related tests for Teaclave

Posted by GitBox <gi...@apache.org>.
mssun commented on a change in pull request #535:
URL: https://github.com/apache/incubator-teaclave/pull/535#discussion_r681189272



##########
File path: examples/python/wasm_tvm_mnist_payload/Cargo.toml
##########
@@ -0,0 +1,40 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+[package]
+name = "mnist"
+version = "0.1.0"
+edition = "2018"
+license = "Apache-2.0"
+
+[profile.release]
+lto = true
+opt-level = 's'
+
+[lib]
+crate-type = ['cdylib']
+
+[dependencies]
+teaclave_context = {path = "../../../sdk/payload/wasm/teaclave_context/"}
+# image = "0.23"

Review comment:
       Remove these unused crates.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave] mssun commented on a change in pull request #535: Add TVM MNIST example and related tests for Teaclave

Posted by GitBox <gi...@apache.org>.
mssun commented on a change in pull request #535:
URL: https://github.com/apache/incubator-teaclave/pull/535#discussion_r681284530



##########
File path: examples/python/wasm_tvm_mnist_payload/build_lib.py
##########
@@ -0,0 +1,103 @@
+#!/usr/bin/env python3
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+"""Builds a simple resnet50 graph for testing."""
+import argparse
+import os
+import subprocess
+import sys
+
+import onnx
+import tvm
+from tvm import relay, runtime
+from tvm.contrib.download import download_testdata
+from tvm.contrib import graph_executor
+
+from PIL import Image
+import numpy as np
+import tvm.relay as relay
+
+# https://github.com/onnx/models/tree/master/vision/classification/mnist
+
+# This example uses resnet50-v2-7 model

Review comment:
       mnist-8 model




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org