Skip to content

Commit

Permalink
Add HIP_RETURN_IF_ERROR macro
Browse files Browse the repository at this point in the history
  • Loading branch information
tianleiwu committed Oct 25, 2024
1 parent 7368654 commit 255d289
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions onnxruntime/core/providers/migraphx/migraphx_call.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#pragma once
#include "migraphx_inc.h"
#include "core/common/common.h"

namespace onnxruntime {

Expand All @@ -16,5 +17,6 @@ std::conditional_t<THRW, void, Status> RocmCall(

#define HIP_CALL(expr) (RocmCall<hipError_t, false>((expr), #expr, "HIP", hipSuccess, "", __FILE__, __LINE__))
#define HIP_CALL_THROW(expr) (RocmCall<hipError_t, true>((expr), #expr, "HIP", hipSuccess, "", __FILE__, __LINE__))
#define HIP_RETURN_IF_ERROR(expr) ORT_RETURN_IF_ERROR(HIP_CALL(expr))

} // namespace onnxruntime
2 changes: 0 additions & 2 deletions onnxruntime/core/providers/migraphx/migraphx_stream_handle.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
#include "migraphx_inc.h"
#include "migraphx_call.h"

#define HIP_RETURN_IF_ERROR(expr) ORT_RETURN_IF_ERROR(HIP_CALL(expr))

namespace onnxruntime {
void WaitMIGraphXNotificationOnDevice(Stream& stream, synchronize::Notification& notification);

Expand Down

0 comments on commit 255d289

Please sign in to comment.