miopen-wrapper.h 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. #if !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)
  2. #pragma once
  3. // Enable MIOpen Beta APIs including miopenSetTensorDescriptorV2 which supports
  4. // 64-bit tensor dimensions/strides for large tensors (numel > INT32_MAX).
  5. // Reference: https://github.com/ROCm/MIOpen/pull/2838
  6. #ifndef MIOPEN_BETA_API
  7. #define MIOPEN_BETA_API 1
  8. #endif
  9. #include <miopen/miopen.h>
  10. #include <miopen/version.h>
  11. #if MIOPEN_VERSION_MAJOR > 3 || (MIOPEN_VERSION_MAJOR == 3 && MIOPEN_VERSION_MINOR >= 4)
  12. // miopen 3.4 moved find mode from private header to public header
  13. #else
  14. // from miopen_internal.h
  15. extern "C" {
  16. typedef enum
  17. {
  18. miopenConvolutionFindModeNormal = 1, /*!< Normal mode */
  19. } miopenConvolutionFindMode_t;
  20. miopenStatus_t miopenSetConvolutionFindMode(
  21. miopenConvolutionDescriptor_t convDesc,
  22. miopenConvolutionFindMode_t findMode);
  23. }
  24. #endif
  25. #else
  26. #error "This file should not be included when either TORCH_STABLE_ONLY or TORCH_TARGET_VERSION is defined."
  27. #endif // !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)