Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Commit

Permalink
Fboemer/ngtf 0.10.0 rc1 (#131)
Browse files Browse the repository at this point in the history
* Updated to ngtf v0.10.0-rc1
  • Loading branch information
fboemer committed Jan 30, 2019
1 parent c1a4aa0 commit 7931a73
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -55,7 +55,7 @@ source external/venv-tf-py3/bin/activate
```

### 2. Run C++ unit-tests
Ensure the virtual environment is active, i.e. run `source $HE_TRANSFORMER /external/venv-tf-py3/bin/activate`
Ensure the virtual environment is active, i.e. run `source $HE_TRANSFORMER/external/venv-tf-py3/bin/activate`
```bash
cd $HE_TRANSFORMER/build
# To run CKKS unit-test
Expand All @@ -67,7 +67,7 @@ cd $HE_TRANSFORMER/build
```

### 3. Run Simple python example
Ensure the virtual environment is active, i.e. run `source $HE_TRANSFORMER /external/venv-tf-py3/bin/activate`
Ensure the virtual environment is active, i.e. run `source $HE_TRANSFORMER/external/venv-tf-py3/bin/activate`
```bash
cd $HE_TRANSFORMER/examples
# Run with CPU
Expand Down
2 changes: 1 addition & 1 deletion cmake/ngraph-tf.cmake
Expand Up @@ -20,7 +20,7 @@ set(EXTERNAL_NGRAPH_INSTALL_DIR ${EXTERNAL_INSTALL_DIR})
set(NGRAPH_TF_CMAKE_PREFIX ext_ngraph_tf)

SET(NGRAPH_TF_REPO_URL https://github.com/NervanaSystems/ngraph-tf.git)
SET(NGRAPH_TF_GIT_LABEL v0.9.0)
SET(NGRAPH_TF_GIT_LABEL v0.10.0-rc1)

SET(NGRAPH_TF_SRC_DIR ${CMAKE_BINARY_DIR}/${NGRAPH_TF_CMAKE_PREFIX}/src/${NGRAPH_TF_CMAKE_PREFIX})
SET(NGRAPH_TF_BUILD_DIR ${NGRAPH_TF_SRC_DIR}/build)
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Expand Up @@ -82,7 +82,7 @@ message("NGRAPH_TF_VENV_LIB_DIR ${NGRAPH_TF_VENV_LIB_DIR}")

install(TARGETS he_backend DESTINATION ${EXTERNAL_INSTALL_LIB_DIR})

# Create symbolic links for CKKS and BFV backends, to allow ng-tf to recognize these backends.
# Create symbolic links for CKKS and BFV backends, to allow ngraph and ngraph-tf to recognize these backends.
add_custom_target(he_seal_ckks_backend ALL DEPENDS he_backend
COMMAND ${CMAKE_COMMAND} -E create_symlink
${EXTERNAL_INSTALL_LIB_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}he_backend${CMAKE_SHARED_LIBRARY_SUFFIX}
Expand Down
11 changes: 7 additions & 4 deletions src/he_backend.cpp
Expand Up @@ -562,6 +562,8 @@ void runtime::he::HEBackend::generate_calls(
}
break;
}
case OP_TYPEID::BroadcastLike:
break;
case OP_TYPEID::Concat: {
const op::Concat* concat = static_cast<const op::Concat*>(&node);

Expand Down Expand Up @@ -867,6 +869,8 @@ void runtime::he::HEBackend::generate_calls(
}
break;
}
case OP_TYPEID::ScalarConstantLike:
break;
case OP_TYPEID::Slice: {
const op::Slice* slice = static_cast<const op::Slice*>(&node);
Shape in_shape = node.get_input_shape(0);
Expand Down Expand Up @@ -938,8 +942,10 @@ void runtime::he::HEBackend::generate_calls(
// Unsupported ops
case OP_TYPEID::Abs:
case OP_TYPEID::Acos:
case OP_TYPEID::All:
case OP_TYPEID::AllReduce:
case OP_TYPEID::And:
case OP_TYPEID::Any:
case OP_TYPEID::ArgMax:
case OP_TYPEID::ArgMin:
case OP_TYPEID::Asin:
Expand All @@ -956,10 +962,10 @@ void runtime::he::HEBackend::generate_calls(
case OP_TYPEID::Cosh:
case OP_TYPEID::Dequantize:
case OP_TYPEID::Divide:
case OP_TYPEID::EmbeddingLookup:
case OP_TYPEID::Equal:
case OP_TYPEID::Exp:
case OP_TYPEID::Floor:
case OP_TYPEID::FunctionCall:
case OP_TYPEID::GenerateMask:
case OP_TYPEID::GetOutputElement:
case OP_TYPEID::Greater:
Expand All @@ -981,14 +987,11 @@ void runtime::he::HEBackend::generate_calls(
case OP_TYPEID::Power:
case OP_TYPEID::Product:
case OP_TYPEID::Quantize:
case OP_TYPEID::Reduce:
case OP_TYPEID::ReduceWindow:
case OP_TYPEID::Relu:
case OP_TYPEID::ReluBackprop:
case OP_TYPEID::ReplaceSlice:
case OP_TYPEID::ReverseSequence:
case OP_TYPEID::Select:
case OP_TYPEID::SelectAndScatter:
case OP_TYPEID::ShapeOf:
case OP_TYPEID::Sigmoid:
case OP_TYPEID::SigmoidBackprop:
Expand Down
3 changes: 2 additions & 1 deletion src/he_tensor.cpp
Expand Up @@ -27,7 +27,8 @@ runtime::he::HETensor::HETensor(const element::Type& element_type,
const Shape& shape, const HEBackend* he_backend,
bool batched, const string& name)
: runtime::Tensor(std::make_shared<descriptor::Tensor>(
element_type, batch_shape(shape, 0, batched), name)),
element_type, batch_shape(shape, 0, batched), name),
he_backend),
m_he_backend(he_backend),
m_batched(batched) {
m_descriptor->set_tensor_layout(
Expand Down
4 changes: 2 additions & 2 deletions test/CMakeLists.txt
Expand Up @@ -94,11 +94,11 @@ if(NGRAPH_HE_SANITIZE_ADDRESS)
endif()

# Add ngraph test utils library
add_library(ngraph_test_util SHARED IMPORTED)
add_library(ngraph_test_util STATIC IMPORTED)
set_target_properties(
ngraph_test_util
PROPERTIES IMPORTED_LOCATION
${NGRAPH_TF_LIB_DIR}/libngraph_test_util.so
${NGRAPH_TF_LIB_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}ngraph_test_util${CMAKE_STATIC_LIBRARY_SUFFIX}
)

target_link_libraries(unit-test libgtest ngraph)
Expand Down

0 comments on commit 7931a73

Please sign in to comment.