Skip to content

Commit

Permalink
CR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheil Kumar committed Jan 24, 2020
1 parent ba23140 commit 8bbf921
Show file tree
Hide file tree
Showing 30 changed files with 468 additions and 1,094 deletions.
70 changes: 46 additions & 24 deletions cmake/winml.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -121,26 +121,33 @@ target_link_libraries(winml_lib_telemetry PRIVATE wil)
# Add winml_lib_ort
###########################

list(APPEND winml_lib_api_ort_files
${winml_lib_api_ort_dir}/inc/OnnxruntimeProvider.h
${winml_lib_api_ort_dir}/OnnxruntimeCpuSessionBuilder.h
${winml_lib_api_ort_dir}/OnnxruntimeCpuSessionBuilder.cpp
${winml_lib_api_ort_dir}/OnnxruntimeDescriptorConverter.h
${winml_lib_api_ort_dir}/OnnxruntimeDescriptorConverter.cpp
${winml_lib_api_ort_dir}/OnnxruntimeEngine.h
${winml_lib_api_ort_dir}/OnnxruntimeEngine.cpp
${winml_lib_api_ort_dir}/OnnxruntimeEngineBuilder.h
${winml_lib_api_ort_dir}/OnnxruntimeEngineBuilder.cpp
${winml_lib_api_ort_dir}/OnnxruntimeEnvironment.h
${winml_lib_api_ort_dir}/OnnxruntimeEnvironment.cpp
${winml_lib_api_ort_dir}/OnnxruntimeModel.h
${winml_lib_api_ort_dir}/OnnxruntimeModel.cpp
${winml_lib_api_ort_dir}/OnnxruntimeSessionBuilder.h
${winml_lib_api_ort_dir}/pch.h
)

if (onnxruntime_USE_DML)
list(APPEND winml_lib_api_ort_files
${winml_lib_api_ort_dir}/OnnxruntimeDmlSessionBuilder.h
${winml_lib_api_ort_dir}/OnnxruntimeDmlSessionBuilder.cpp
)
endif(onnxruntime_USE_DML)

# Add static library that will be archived/linked for both static/dynamic library
add_library(winml_lib_ort STATIC
${winml_lib_api_ort_dir}/inc/OnnxruntimeProvider.h
${winml_lib_api_ort_dir}/OnnxruntimeCpuSessionBuilder.h
${winml_lib_api_ort_dir}/OnnxruntimeCpuSessionBuilder.cpp
${winml_lib_api_ort_dir}/OnnxruntimeDmlSessionBuilder.h
${winml_lib_api_ort_dir}/OnnxruntimeDmlSessionBuilder.cpp
${winml_lib_api_ort_dir}/OnnxruntimeDescriptorConverter.h
${winml_lib_api_ort_dir}/OnnxruntimeDescriptorConverter.cpp
${winml_lib_api_ort_dir}/OnnxruntimeEngine.h
${winml_lib_api_ort_dir}/OnnxruntimeEngine.cpp
${winml_lib_api_ort_dir}/OnnxruntimeEngineBuilder.h
${winml_lib_api_ort_dir}/OnnxruntimeEngineBuilder.cpp
${winml_lib_api_ort_dir}/OnnxruntimeEnvironment.h
${winml_lib_api_ort_dir}/OnnxruntimeEnvironment.cpp
${winml_lib_api_ort_dir}/OnnxruntimeModel.h
${winml_lib_api_ort_dir}/OnnxruntimeModel.cpp
${winml_lib_api_ort_dir}/OnnxruntimeSessionBuilder.h
${winml_lib_api_ort_dir}/pch.h
)
add_library(winml_lib_ort STATIC ${winml_lib_api_ort_files})

# Compiler options
target_compile_features(winml_lib_ort PRIVATE cxx_std_17)
Expand Down Expand Up @@ -189,12 +196,7 @@ target_link_libraries(winml_lib_ort PRIVATE wil)
###########################

list(APPEND winml_adapter_files
${winml_adapter_dir}/AbiCustomRegistryImpl.cpp
${winml_adapter_dir}/AbiCustomRegistryImpl.h
${winml_adapter_dir}/CustomRegistryHelper.h
${winml_adapter_dir}/pch.h
${winml_adapter_dir}/ZeroCopyInputStreamWrapper.cpp
${winml_adapter_dir}/ZeroCopyInputStreamWrapper.h
${winml_adapter_dir}/winml_adapter_apis.h
${winml_adapter_dir}/winml_adapter_c_api.h
${winml_adapter_dir}/winml_adapter_c_api.cpp
Expand All @@ -209,6 +211,13 @@ list(APPEND winml_adapter_files
${winml_adapter_dir}/winml_adapter_sequence_type_info.h
${winml_adapter_dir}/winml_adapter_session.cpp
)

if (onnxruntime_USE_DML)
list(APPEND winml_adapter_files
${winml_adapter_dir}/abi_custom_registry_impl.cpp
${winml_adapter_dir}/abi_custom_registry_impl.h
)
endif(onnxruntime_USE_DML)

add_library(winml_adapter ${winml_adapter_files})

Expand Down Expand Up @@ -437,6 +446,19 @@ endif(onnxruntime_USE_DML)
###########################

add_library(winml_lib_common STATIC
${winml_lib_common_dir}/inc/common.h
${winml_lib_common_dir}/inc/CommonDeviceHelpers.h
${winml_lib_common_dir}/inc/cppwinrt_onnx.h
${winml_lib_common_dir}/inc/dx.h
${winml_lib_common_dir}/inc/errors.h
${winml_lib_common_dir}/inc/iengine.h
${winml_lib_common_dir}/inc/NamespaceAliases.h
${winml_lib_common_dir}/inc/onnx.h
${winml_lib_common_dir}/inc/PheonixSingleton.h
${winml_lib_common_dir}/inc/StringHelpers.h
${winml_lib_common_dir}/inc/WinMLTelemetryHelper.h
${winml_lib_common_dir}/inc/WinML_Lock.h
${winml_lib_common_dir}/inc/winrt_headers.h
${winml_lib_common_dir}/CommonDeviceHelpers.cpp
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#include "onnxruntime_c_api.h"

struct OrtApi;
struct WinmlAdapterApi;
typedef struct WinmlAdapterApi WinmlAdapterApi;

Expand Down
3 changes: 1 addition & 2 deletions onnxruntime/core/session/onnxruntime_c_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "core/framework/tensor.h"
#include "core/framework/ml_value.h"
#include "core/session/environment.h"
#include "core/session/onnxruntime_env.h"
#include "core/framework/callback.h"
#include "core/framework/tensorprotoutils.h"
#include "core/framework/onnxruntime_typeinfo.h"
Expand All @@ -28,8 +29,6 @@
#include "core/framework/TensorSeq.h"
#include "core/platform/ort_mutex.h"

#include "core/session/onnxruntime_env.h"

using namespace onnxruntime::logging;
using onnxruntime::BFloat16;
using onnxruntime::DataTypeImpl;
Expand Down
30 changes: 0 additions & 30 deletions winml/adapter/CustomRegistryHelper.h

This file was deleted.

Loading

0 comments on commit 8bbf921

Please sign in to comment.