Skip to content

Commit

Permalink
Revive the Rust + SGX refactor (apache#4976)
Browse files Browse the repository at this point in the history
* Add Nick's changes's squashed

* Fix frontend compilation

* Re-enable Rust CI

* Add changes with conflicted badly

* Restructure import_module! macro in order to avoid unstable features

* Kill old unstable feature enablement

* Refactor common to use new APIs

* Move the code to stable

* Fix warning

Co-authored-by: Nick Hynes <nhynes@oasislabs.com>
  • Loading branch information
2 people authored and Trevor Morris committed Apr 16, 2020
1 parent 9df074e commit 505039b
Show file tree
Hide file tree
Showing 84 changed files with 1,498 additions and 2,377 deletions.
8 changes: 0 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ tvm_option(USE_GRAPH_RUNTIME "Build with tiny graph runtime" ON)
tvm_option(USE_GRAPH_RUNTIME_DEBUG "Build with tiny graph runtime debug mode" OFF)
tvm_option(USE_OPENMP "Build with OpenMP thread pool implementation" OFF)
tvm_option(USE_RELAY_DEBUG "Building Relay in debug mode..." OFF)
tvm_option(USE_SGX "Build with SGX" OFF)
tvm_option(USE_RTTI "Build with RTTI" ON)
tvm_option(USE_MSVC_MT "Build with MT" OFF)
tvm_option(USE_MICRO "Build with Micro" OFF)
Expand Down Expand Up @@ -257,7 +256,6 @@ include(cmake/modules/OpenMP.cmake)
include(cmake/modules/Vulkan.cmake)
include(cmake/modules/Metal.cmake)
include(cmake/modules/ROCM.cmake)
include(cmake/modules/SGX.cmake)
include(cmake/modules/LLVM.cmake)
include(cmake/modules/Micro.cmake)
include(cmake/modules/ANTLR.cmake)
Expand Down Expand Up @@ -299,12 +297,6 @@ else()
set_target_properties(tvm PROPERTIES COMPILE_DEFINITIONS "NDEBUG")
endif(USE_RELAY_DEBUG)

if(NOT USE_SGX STREQUAL "OFF")
add_dependencies(tvm sgx_edl)
add_dependencies(tvm_runtime sgx_edl tvm_t)
install(TARGETS tvm_t ARCHIVE DESTINATION lib${LIB_SUFFIX})
endif()

if(USE_THREADS)
message(STATUS "Build with thread support...")
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
Expand Down
1 change: 1 addition & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ stage('Build') {
sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_vta_fsim.sh"
sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_vta_tsim.sh"
sh "${docker_run} ${ci_cpu} ./tests/scripts/task_golang.sh"
sh "${docker_run} ${ci_cpu} ./tests/scripts/task_rust.sh"
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions apps/sgx/.cargo/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[build]
target = "x86_64-fortanix-unknown-sgx"

[target.x86_64-fortanix-unknown-sgx]
runner = "ftxsgx-runner-cargo"
1 change: 0 additions & 1 deletion apps/sgx/.gitignore

This file was deleted.

1 change: 1 addition & 0 deletions apps/sgx/.rustfmt.toml
Loading

0 comments on commit 505039b

Please sign in to comment.