Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename preprocessor flag for uniformity and add missing places
  • Loading branch information
Karim Vadsariya authored and wonchung-microsoft committed Jul 22, 2025
commit 73edb49d707218ffce5d49b8f6d007e196d7c2ed
2 changes: 1 addition & 1 deletion cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ if (onnxruntime_USE_MIGRAPHX)
endif()

if (onnxruntime_USE_MIGRAPHX_INTERFACE AND (NOT onnxruntime_USE_MIGRAPHX))
list(APPEND ORT_PROVIDER_FLAGS -DUSE_MIGRAPHX_INTERFACE=1)
list(APPEND ORT_PROVIDER_FLAGS -DUSE_MIGRAPHX_PROVIDER_INTERFACE=1)
endif()

if (onnxruntime_USE_ARMNN)
Expand Down
2 changes: 1 addition & 1 deletion onnxruntime/core/providers/provider_factory_creators.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include "core/providers/dnnl/dnnl_provider_factory_creator.h"
#endif

#if defined(USE_MIGRAPHX)
#if defined(USE_MIGRAPHX) || defined(USE_MIGRAPHX_PROVIDER_INTERFACE)
#include "core/providers/migraphx/migraphx_provider_factory_creator.h"
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ std::unique_ptr<IDataTransfer> CreateGPUDataTransfer() {
}
#endif

#if defined(USE_MIGRAPHX) || defined(USE_MIGRAPHX_INTERFACE)
#if defined(USE_MIGRAPHX) || defined(USE_MIGRAPHX_PROVIDER_INTERFACE)
std::unique_ptr<IAllocator> CreateMIGraphXAllocator(int16_t device_id, const char* name) {
return g_host->CreateMIGraphXAllocator(device_id, name);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ struct ProviderHost {
virtual Status CudaCall_false(int retCode, const char* exprString, const char* libName, int successCode, const char* msg, const char* file, const int line) = 0;
virtual void CudaCall_true(int retCode, const char* exprString, const char* libName, int successCode, const char* msg, const char* file, const int line) = 0;

#if defined(USE_MIGRAPHX) || defined(USE_MIGRAPHX_INTERFACE)
#if defined(USE_MIGRAPHX) || defined(USE_MIGRAPHX_PROVIDER_INTERFACE)
virtual std::unique_ptr<IAllocator> CreateMIGraphXAllocator(int16_t device_id, const char* name) = 0;
virtual std::unique_ptr<IAllocator> CreateMIGraphXPinnedAllocator(int16_t device_id, const char* name) = 0;
#endif
Expand Down
2 changes: 1 addition & 1 deletion onnxruntime/core/session/provider_bridge_ort.cc
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ struct ProviderHostImpl : ProviderHost {
Status CudaCall_false(int retCode, const char* exprString, const char* libName, int successCode, const char* msg, const char* file, const int line) override { return GetProviderInfo_CUDA().CudaCall_false(retCode, exprString, libName, successCode, msg, file, line); }
void CudaCall_true(int retCode, const char* exprString, const char* libName, int successCode, const char* msg, const char* file, const int line) override { GetProviderInfo_CUDA().CudaCall_true(retCode, exprString, libName, successCode, msg, file, line); }

#if defined(USE_MIGRAPHX) || defined(USE_MIGRAPHX_INTERFACE)
#if defined(USE_MIGRAPHX) || defined(USE_MIGRAPHX_PROVIDER_INTERFACE)
std::unique_ptr<IAllocator> CreateMIGraphXAllocator(int16_t device_id, const char* name) override { return GetProviderInfo_MIGraphX().CreateMIGraphXAllocator(device_id, name); }
std::unique_ptr<IAllocator> CreateMIGraphXPinnedAllocator(int16_t device_id, const char* name) override { return GetProviderInfo_MIGraphX().CreateMIGraphXPinnedAllocator(device_id, name); }
#endif
Expand Down
2 changes: 1 addition & 1 deletion onnxruntime/python/onnxruntime_pybind_state.cc
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ static std::shared_ptr<IExecutionProviderFactory> CreateExecutionProviderFactory
<< "TensorRT-ExecutionProvider.html#requirements to ensure all dependencies are met.";
#endif
} else if (type == kMIGraphXExecutionProvider) {
#ifdef USE_MIGRAPHX
#if defined(USE_MIGRAPHX) || defined(USE_MIGRAPHX_PROVIDER_INTERFACE)
std::string calibration_table;
std::string save_model_path;
std::string load_model_path;
Expand Down
4 changes: 2 additions & 2 deletions onnxruntime/python/onnxruntime_pybind_state_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ struct OrtStatus {
#define BACKEND_DNNL ""
#endif

#if USE_MIGRAPHX
#if defined(USE_MIGRAPHX) || defined(USE_MIGRAPHX_PROVIDER_INTERFACE)
#define BACKEND_MIGRAPHX "-MIGRAPHX"
#else
#define BACKEND_MIGRAPHX ""
Expand Down Expand Up @@ -132,7 +132,7 @@ struct OrtStatus {
#if defined(USE_NV) || defined(USE_NV_PROVIDER_INTERFACE)
#include "core/providers/nv_tensorrt_rtx/nv_provider_factory.h"
#endif
#ifdef USE_MIGRAPHX
#if defined(USE_MIGRAPHX) || defined(USE_MIGRAPHX_PROVIDER_INTERFACE)
#include "core/providers/migraphx/migraphx_provider_factory.h"
#include "core/providers/migraphx/migraphx_execution_provider_info.h"
#endif
Expand Down
Loading