Skip to content

Commit

Permalink
Try fix AMD builds
Browse files Browse the repository at this point in the history
  • Loading branch information
hariharans29 committed Oct 16, 2023
1 parent 8ac2ebb commit 6f1f61d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions cmake/onnxruntime_rocm_hipify.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ set(provider_excluded_files
"gpu_data_transfer.h"
"integer_gemm.cc"
"tunable/*"
"cuda_nhwc_kernels.cc"
"cuda_nhwc_kernels.h"
)

set(training_ops_excluded_files
Expand Down
7 changes: 6 additions & 1 deletion onnxruntime/core/providers/rocm/miopen_common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,12 @@ Status MiopenTensor::CreateTensorIfNeeded() {
return Status::OK();
}

Status MiopenTensor::Set(gsl::span<const int64_t> input_dims, miopenDataType_t dataType) {
Status MiopenTensor::Set(gsl::span<const int64_t> input_dims, miopenDataType_t dataType, bool is_nhwc) {
if (is_nhwc) {
return ORT_MAKE_STATUS(ONNXRUNTIME, NOT_IMPLEMENTED,
"NHWC Tensor usage is not supported in AMD builds for now");
}

ORT_RETURN_IF_ERROR(CreateTensorIfNeeded());

int rank = gsl::narrow_cast<int>(input_dims.size());
Expand Down
2 changes: 1 addition & 1 deletion onnxruntime/core/providers/rocm/miopen_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class MiopenTensor final {
~MiopenTensor();
ORT_DISALLOW_COPY_ASSIGNMENT_AND_MOVE(MiopenTensor);

Status Set(gsl::span<const int64_t> input_dims, miopenDataType_t dataType);
Status Set(gsl::span<const int64_t> input_dims, miopenDataType_t dataType, bool is_nhwc=false);
Status Set(miopenDataType_t dataType, miopenTensorLayout_t tensor_layout, int n, int c, int h, int w);
Status Set(const MiopenTensor& x_desc, miopenBatchNormMode_t mode);

Expand Down

0 comments on commit 6f1f61d

Please sign in to comment.