mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-28 20:11:22 +00:00
Use miopenGetConvolutionSpatialDim if ROCm5.5 (#14483)
MIOpen created a new API to get the spatial dimensions.
This commit is contained in:
parent
ce9a71620f
commit
7e9f543af4
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
@ -113,6 +116,7 @@ struct FNVHash {
|
|||
"miopenGetConvolutionNdDescriptor is supposed to fail before spatial_dim gets to ",
|
||||
spatial_dim);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
uint32_t value_ = BASIS;
|
||||
|
|
|
|||
Loading…
Reference in a new issue