Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added miopenGetConvolutionSpatialDim if ROCm5.5 #14483

Merged
merged 2 commits into from
Feb 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion onnxruntime/contrib_ops/rocm/fused_conv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ struct FNVHash {

void HashConvolutionDescriptor(miopenConvolutionDescriptor_t cdesc) {
int spatial_dim = 1;
// Current MIOpen doesn't provide API to probe the dimension of a
#if ROCM_VERSION >= 50500
miopenGetConvolutionDescriptorSize(cdesc, &spatial_dim);
#else
// Previous versions of MIOpen doesn't provide API to probe the dimension of a
// miopenConvolutionDescriptor_t, so we have to guess.
// This algorithm is based on a specific behavior of miopenGetConvolutionNdDescriptor,
// which fails when requestedSpatialDim > the convolution's spatial dimension
Expand Down Expand Up @@ -113,6 +116,7 @@ struct FNVHash {
"miopenGetConvolutionNdDescriptor is supposed to fail before spatial_dim gets to ",
spatial_dim);
}
#endif
}
private:
uint32_t value_ = BASIS;
Expand Down