Skip to content

Commit

Permalink
Fix another hipMemcpy
Browse files Browse the repository at this point in the history
  • Loading branch information
xinyazhang committed Oct 24, 2024
1 parent 8479091 commit 7a67ee5
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1445,7 +1445,15 @@ Status MIGraphXExecutionProvider::Compile(const std::vector<FusedNodeAndGraph>&
std::vector<int64_t> ort_shape{res_lens.begin(), res_lens.end()};
auto output_tensor = ctx.GetOutput(i, ort_shape.data(), ort_shape.size());
void* output_data = output_tensor.GetTensorMutableRawData();
#ifdef MIGRAPHX_STREAM_SYNC
HIP_CALL_THROW(hipMemcpyWithStream(output_data,
gpu_res.data(),
res_shape.bytes(),
hipMemcpyDeviceToDevice,
static_cast<hipStream_t>(rocm_stream)));
#else
HIP_CALL_THROW(hipMemcpy(output_data, gpu_res.data(), res_shape.bytes(), hipMemcpyDeviceToDevice));
#endif
}
}
};
Expand Down

0 comments on commit 7a67ee5

Please sign in to comment.