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

[HIPIFY][MIOpen][feature] Support backend graphAPI for translating from cuDNN to MIOpen directly. #1624

Closed
BrianHarrisonAMD opened this issue Aug 19, 2024 · 2 comments
Assignees
Labels
feature Feature request or implementation MIOpen

Comments

@BrianHarrisonAMD
Copy link

Problem Description

Requesting support to HIPIFY directly from cuDNN to MIOpen for a subset of the backend GraphAPI methods and types.

Here is a file that has the types and functions that need to support translation for the backend API:

Types list:

  • cudnnTensorFormat_t -> miopenTensorLayout_t
  • For all backend types:
    • cudnnBackendX_t -> miopenBackendX_t
    • cudnnBackendXType_t -> miopenBackendXType_t
    • CUDNN_BACKEND_X_DESCRIPTOR -> MIOPEN_BACKEND_X_DESCRIPTOR

Functions List:

  • cudnnBackendCreateDescriptor -> miopenBackendCreateDescriptor
  • cudnnBackendDestroyDescriptor -> miopenBackendDestroyDescriptor
  • cudnnBackendInitialize -> miopenBackendInitialize
  • cudnnBackendFinalize -> miopenBackendInitialize
  • cudnnBackendSetAttribute -> miopenBackendSetAttribute
  • cudnnBackendGetAttribute -> miopenBackendGetAttribute
  • cudnnBackendExecute -> miopenBackendExecute

Operating System

Ubuntu 20.04.6 LTS (Focal Fossa) or Ubuntu 22.04.4 LTS (Jammy Jellyfish)

CPU

Any

ROCm Version

ROCm 6.0.0

ROCm Component

HIPIFY

Steps to Reproduce

No response

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

No response

Additional Information

No response

@emankov emankov self-assigned this Aug 20, 2024
@emankov emankov added MIOpen feature Feature request or implementation labels Aug 20, 2024
emankov added a commit to emankov/HIPIFY that referenced this issue Aug 23, 2024
…direct translation from `cuDNN` to `MIOpen` - Part 1

+ `cudnnTensorFormat_t` -> `miopenTensorLayout_t`
+ `cudnnBackendDescriptorType_t` -> `miopenBackendDescriptorType_t`
+ Updated synthetic tests, the regenerated `hipify-perl`, and `DNN` `CUDA2HIP` documentation
+ [ToDo] `MIOpen` API versioning
emankov added a commit that referenced this issue Aug 23, 2024
[HIPIFY][#584][#1624][MIOpen] Support for backend `graphAPI` direct translation from `cuDNN` to `MIOpen` - Part 1
@emankov emankov changed the title [HIPIFY][feature] Support backend graphAPI for translating from cuDNN to MIOpen directly. [HIPIFY][MIOpen][feature] Support backend graphAPI for translating from cuDNN to MIOpen directly. Aug 23, 2024
emankov added a commit to emankov/HIPIFY that referenced this issue Aug 26, 2024
…direct translation from `cuDNN` to `MIOpen` - Part 2

+ `cudnnBackendAttributeType_t` -> `miopenBackendAttributeType_t`
+ Updated synthetic tests, the regenerated `hipify-perl`, and `DNN` `CUDA2HIP` documentation
+ [ToDo] `MIOpen` API versioning
emankov added a commit that referenced this issue Aug 26, 2024
[HIPIFY][#584][#1624][MIOpen] Support for backend `graphAPI` direct translation from `cuDNN` to `MIOpen` - Part 2
emankov added a commit to emankov/HIPIFY that referenced this issue Sep 3, 2024
…direct translation from `cuDNN` to `MIOpen` - Part 3

+ `cudnnBackendAttributeName_t` -> `miopenBackendAttributeName_t` -  partial
+ Updated the regenerated `hipify-perl`, and `DNN` `CUDA2HIP` documentation
+ [ToDo] `synthetic tests
emankov added a commit that referenced this issue Sep 3, 2024
[HIPIFY][#584][#1624][MIOpen] Support for backend `graphAPI` direct translation from `cuDNN` to `MIOpen` - Part 3
emankov added a commit to emankov/HIPIFY that referenced this issue Sep 4, 2024
…direct translation from `cuDNN` to `MIOpen` - Part 4

+ `cudnnBackendAttributeName_t` -> `miopenBackendAttributeName_t` - continuation
+ Updated synthetic tests, the regenerated `hipify-perl`, and `DNN` `CUDA2HIP` documentation
emankov added a commit that referenced this issue Sep 4, 2024
[HIPIFY][#584][#1624][MIOpen] Support for backend `graphAPI` direct translation from `cuDNN` to `MIOpen` - Part 4
emankov added a commit to emankov/HIPIFY that referenced this issue Sep 5, 2024
…direct translation from `cuDNN` to `MIOpen` - Part 5

+ `cudnnBackendAttributeName_t` -> `miopenBackendAttributeName_t` - continuation
+ Updated synthetic tests, the regenerated `hipify-perl`, and `DNN` `CUDA2HIP` documentation
emankov added a commit that referenced this issue Sep 5, 2024
[HIPIFY][#584][#1624][MIOpen] Support for backend `graphAPI` direct translation from `cuDNN` to `MIOpen` - Part 5
emankov added a commit to emankov/HIPIFY that referenced this issue Sep 6, 2024
…direct translation from `cuDNN` to `MIOpen` - Part 6

+ `cudnnBackendAttributeName_t` -> `miopenBackendAttributeName_t` - continuation
+ Updated synthetic tests, the regenerated `hipify-perl`, and `DNN` `CUDA2HIP` documentation
emankov added a commit that referenced this issue Sep 6, 2024
[HIPIFY][#584][#1624][MIOpen] Support for backend `graphAPI` direct translation from `cuDNN` to `MIOpen` - Part 6
emankov added a commit to emankov/HIPIFY that referenced this issue Sep 9, 2024
…direct translation from `cuDNN` to `MIOpen` - Part 7

+ `cudnnBackendAttributeName_t` -> `miopenBackendAttributeName_t` - final
+ Updated synthetic tests, the regenerated `hipify-perl`, and `DNN` `CUDA2HIP` documentation
emankov added a commit that referenced this issue Sep 9, 2024
[HIPIFY][#584][#1624][MIOpen] Support for backend `graphAPI` direct translation from `cuDNN` to `MIOpen` - Part 7
emankov added a commit to emankov/HIPIFY that referenced this issue Sep 12, 2024
…direct translation from `cuDNN` to `MIOpen` - Part 8

+ Added the missing `cudnnCTCGradMode_t` appeared in cuDNN 9.0.0
+ Fixed: `cudnnReduceTensorOp_t` deprecated in cuDNN 9.0.0 was undeprecated in cuDNN 9.1.0
+ Updated synthetic tests, the regenerated `hipify-perl`, and `DNN` `CUDA2HIP` documentation
emankov added a commit that referenced this issue Sep 12, 2024
[HIPIFY][#584][#1624][MIOpen] Support for backend `graphAPI` direct translation from `cuDNN` to `MIOpen` - Part 8
emankov added a commit to emankov/HIPIFY that referenced this issue Sep 17, 2024
…direct translation from `cuDNN` to `MIOpen` - Part 9

+ `cudnnConvolutionMode_t` -> `miopenConvolutionMode_t`
+ `cudnnPointwiseMode_t` -> `miopenPointwiseMode_t`
+ `cudnnBackendDescriptor_t` -> `miopenBackendDescriptor_t`
+ Updated synthetic tests, the regenerated `hipify-perl`, and `DNN` `CUDA2HIP` documentation
emankov added a commit that referenced this issue Sep 17, 2024
[HIPIFY][#584][#1624][MIOpen] Support for backend `graphAPI` direct translation from `cuDNN` to `MIOpen` - Part 9
emankov added a commit to emankov/HIPIFY that referenced this issue Sep 19, 2024
…direct translation from `cuDNN` to `MIOpen` - Part 10

+ `cudnnBackendHeurMode_t` -> `miopenBackendHeurMode_t`
+ `cudnnRngDistribution_t` -> `miopenRngDistribution_t`
+ Backend functions, except `miopenBackendInitialize` due to to ф signature difference from `cudnnBackendInitialize`
+ Updated synthetic tests, the regenerated `hipify-perl`, and `DNN` `CUDA2HIP` documentation
emankov added a commit that referenced this issue Sep 19, 2024
[HIPIFY][#584][#1624][MIOpen] Support for backend `graphAPI` direct translation from `cuDNN` to `MIOpen` - Part 10
@emankov
Copy link
Collaborator

emankov commented Sep 19, 2024

cudnnBackendInitialize -> miopenBackendInitialize:

The functions have different signatures:

CUDNN_DEPRECATED cudnnStatus_t CUDNNWINAPI
cudnnBackendInitialize(cudnnBackendDescriptor_t descriptor);
MIOPEN_EXPORT miopenStatus_t miopenBackendInitialize(miopenBackendDescriptor_t descriptor,
                                                     miopenBackendDescriptorType_t descriptorType,
                                                     size_t sizeInBytes);

There are two options here:
1. [MIOpen team] To provide the default values for arguments descriptorType and sizeInBytes.
2. [MIOpen team] To provide yet another function - miopenBackendInitialize with the same signature as cudnnBackendInitialize

@BrianHarrisonAMD, what do you prefer, or are there might be other options on the list?

emankov added a commit to emankov/HIPIFY that referenced this issue Oct 2, 2024
…direct translation from `cuDNN` to `MIOpen` - Part 11 - final

+ `cudnnDataType_t` -> `miopenDataType_t` (missing float8 types)
+ `cudnnPoolingMode_t` -> `miopenPoolingMode_t`
+ `cudnnActivationMode_t` -> `miopenActivationMode_t` (missing `miopenActivationLOGISTIC`)
+ `cudnnRNNPaddingMode_t` -> `miopenRNNPaddingMode_t`
+ `cudnnForwardMode_t` -> `miopenRNNFWDMode_t`
+ `cudnnPaddingMode_t` -> `miopenPaddingMode_t`
+ [fix] `cudnnRNNPaddingMode_t` versioning
+ Updated synthetic tests, the regenerated `hipify-perl`, and `DNN` `CUDA2HIP` documentation
emankov added a commit that referenced this issue Oct 2, 2024
[HIPIFY][#584][#1624][MIOpen] Support for backend `graphAPI` direct translation from `cuDNN` to `MIOpen` - Part 11 - final
@BrianHarrisonAMD
Copy link
Author

LGTM!

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request or implementation MIOpen
Projects
None yet
Development

No branches or pull requests

2 participants