diff --git a/mlir/tools/mlir-rocm-runner/rocm-runtime-wrappers.cpp b/mlir/tools/mlir-rocm-runner/rocm-runtime-wrappers.cpp --- a/mlir/tools/mlir-rocm-runner/rocm-runtime-wrappers.cpp +++ b/mlir/tools/mlir-rocm-runner/rocm-runtime-wrappers.cpp @@ -36,7 +36,7 @@ HIP_REPORT_IF_ERROR(hipInit(/*flags=*/0)); hipDevice_t device; HIP_REPORT_IF_ERROR(hipDeviceGet(&device, /*ordinal=*/0)); - hipContext_t context; + hipCtx_t context; HIP_REPORT_IF_ERROR(hipCtxCreate(&context, /*flags=*/0, device)); return 0; }(); @@ -110,17 +110,18 @@ extern "C" void *mgpuMemAlloc(uint64_t sizeBytes, hipStream_t /*stream*/) { void *ptr; - HIP_REPORT_IF_ERROR(hipMemAlloc(&ptr, sizeBytes)); + HIP_REPORT_IF_ERROR(hipMalloc(&ptr, sizeBytes)); return ptr; } extern "C" void mgpuMemFree(void *ptr, hipStream_t /*stream*/) { - HIP_REPORT_IF_ERROR(hipMemFree(ptr)); + HIP_REPORT_IF_ERROR(hipFree(ptr)); } extern "C" void mgpuMemcpy(void *dst, void *src, uint64_t sizeBytes, hipStream_t stream) { - HIP_REPORT_IF_ERROR(hipMemcpyAsync(dst, src, sizeBytes, stream)); + HIP_REPORT_IF_ERROR( + hipMemcpyAsync(dst, src, sizeBytes, hipMemcpyDefault, stream)); } /// Helper functions for writing mlir example code