mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
Specific DML version latest and fix compile error
This commit is contained in:
parent
67443c0e17
commit
1950391570
2 changed files with 5 additions and 4 deletions
|
|
@ -431,6 +431,8 @@ if (onnxruntime_USE_DML)
|
|||
add_dependencies(onnxruntime_providers_dml ${onnxruntime_EXTERNAL_DEPENDENCIES})
|
||||
target_include_directories(onnxruntime_providers_dml PRIVATE ${ONNXRUNTIME_ROOT} ${ONNXRUNTIME_ROOT}/../cmake/external/wil/include)
|
||||
|
||||
add_definitions(-DDML_TARGET_VERSION_USE_LATEST=1)
|
||||
|
||||
if (NOT onnxruntime_USE_CUSTOM_DIRECTML)
|
||||
if(NOT onnxruntime_target_platform STREQUAL "x86" AND NOT onnxruntime_target_platform STREQUAL "x64")
|
||||
message(FATAL_ERROR "Target platform ${onnxruntime_target_platform} is not supported by DML")
|
||||
|
|
|
|||
|
|
@ -446,11 +446,10 @@ public:
|
|||
float maxValue = FLT_MAX;
|
||||
if (kernelInfo.IsInputValid(1))
|
||||
{
|
||||
minValue = ReadScalarTensorCastToFloat64(kernelInfo.GetConstantInputTensor(1));
|
||||
minValue = static_cast<float>(ReadScalarTensorCastToFloat64(kernelInfo.GetConstantInputTensor(1)));
|
||||
}
|
||||
if (kernelInfo.IsInputValid(2))
|
||||
{
|
||||
maxValue = ReadScalarTensorCastToFloat64(kernelInfo.GetConstantInputTensor(2));
|
||||
if (kernelInfo.IsInputValid(2)) {
|
||||
maxValue = static_cast<float>(ReadScalarTensorCastToFloat64(kernelInfo.GetConstantInputTensor(2)));
|
||||
}
|
||||
|
||||
DML_ELEMENT_WISE_CLIP_OPERATOR_DESC opDesc = {};
|
||||
|
|
|
|||
Loading…
Reference in a new issue