[Fix] build error with MIGraphX tag rocm-5.4.0 (#14141)

### Description
<!-- Describe your changes. -->

Fix the error https://github.com/microsoft/onnxruntime/issues/14126


### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->

Co-authored-by: peixuanzuo <peixuanzuo@linmif39a000004.zvflicr54joexhdgnhvmxrxygg.phxx.internal.cloudapp.net>
This commit is contained in:
PeixuanZuo 2023-01-06 15:51:25 +08:00 committed by GitHub
parent 0ed7277bbe
commit b222a8e01b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1044,7 +1044,7 @@ Status MIGraphXExecutionProvider::Compile(const std::vector<FusedNodeAndGraph>&
delete static_cast<MIGraphXFuncState*>(state);
};
compute_info.compute_func = [this](FunctionState state, const OrtApi* /* api */, OrtKernelContext* context) {
compute_info.compute_func = [this](FunctionState state, const OrtApi* api, OrtKernelContext* context) {
Ort::KernelContext ctx(context);
MIGraphXFuncState* mgx_state = reinterpret_cast<MIGraphXFuncState*>(state);
@ -1173,7 +1173,7 @@ Status MIGraphXExecutionProvider::Compile(const std::vector<FusedNodeAndGraph>&
#ifdef MIGRAPHX_STREAM_SYNC
void* rocm_stream;
api->KernelContext_GetGPUComputeStream(context, &rocm_stream);
Ort::ThrowOnError(api->KernelContext_GetGPUComputeStream(context, &rocm_stream));
auto prog_outputs = prog.run_async(m, static_cast<hipStream_t>(rocm_stream));
#else
auto prog_outputs = prog.eval(m);