Commits


pengwa authored and GitHub committed d8dfda2e08e
Minor fix for differently scoped cpu_ep usage (#15550) ### Minor fix for differently scoped cpu_ep cpu_ep is under `#ifndef DISABLE_CONTRIB_OPS`, but one of its usage is not under the same condition. ``` #ifndef DISABLE_CONTRIB_OPS const InlinedHashSet<std::string_view> cpu_ep = {onnxruntime::kCpuExecutionProvider}; #endif ``` ### Motivation and Context Postmoterm: https://github.com/microsoft/onnxruntime/pull/15461 passed all CIs except Linux/Windows TVM CIs. I did not check the detailed error message then because they are failed for some reason for a few days at least. While checking the details, after PR 15461, the error messge changes from Before constant sharing change: TVM CI error message: ``` https://github.com/microsoft/onnxruntime/actions/runs/4700368634/jobs/8334955814 ERROR: testBooleanInputs (__main__.TestInferenceSession) ---------------------------------------------------------------------- Traceback (most recent call last): File "onnxruntime_test_python.py", line 617, in testBooleanInputs sess = onnxrt.InferenceSession(get_name("logicaland.onnx"), providers=available_providers) File "D:\a\onnxruntime\onnxruntime\build\Release\Release\onnxruntime\capi\onnxruntime_inference_collection.py", line 383, in __init__ self._create_inference_session(providers, provider_options, disabled_optimizers) File "D:\a\onnxruntime\onnxruntime\build\Release\Release\onnxruntime\capi\onnxruntime_inference_collection.py", line 435, in _create_inference_session sess.initialize_session(providers, provider_options, disabled_optimizers) onnxruntime.capi.onnxruntime_pybind11_state.RuntimeException: [ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Exception during initialization: D:\a\onnxruntime\onnxruntime\onnxruntime\core\providers\tvm\tvm_api.cc:49 onnxruntime::tvm::TVMCompile compile != nullptr was false. Unable to retrieve 'tvm_onnx_import_and_compile'. ``` to ``` D:\a\onnxruntime\onnxruntime\onnxruntime\core\optimizer\graph_transformer_utils.cc(213,67): error C2065: 'cpu_ep': undeclared identifier [D:\a\onnxruntime\onnxruntime\build\Release\onnxruntime_optimizer.vcxproj] D:\a\onnxruntime\onnxruntime\onnxruntime\core\optimizer\graph_transformer_utils.cc(213,19): error C2672: ``` This PR fixes the build the issue, The error message of Windows/Linux TVM CIs are back to the original ones.