Skip to content

[ROCm] Enable MIOpen properly#13048

Closed
iotamudelta wants to merge 2 commits intopytorch:masterfrom
ROCm:miopen_20181024
Closed

[ROCm] Enable MIOpen properly#13048
iotamudelta wants to merge 2 commits intopytorch:masterfrom
ROCm:miopen_20181024

Conversation

@iotamudelta
Copy link
Copy Markdown
Contributor

  • Disable MIOpen convolution on double tensors
  • MIOpen: set group count in convolution descriptor
  • MIOpen: Honor Max Dim (ROCm 222)
  • MIOpen: Batchnorm - Allow half/half and half/float, disallow double
  • Limit MIOpen batchnorm to same-precision
  • Fix maxdim check. (ROCm 246)
  • Fix reversed logic in DISABLE_MIOPEN (ROCm 253)
  • Export LANG/LC_ALL also for the test step.
  • Make tensors contiguous before calling MIOpen batch norm
  • Actually pass dilation to MIOpen.
  • Do not use MIOpen if there is dilation and the group size is > 1. - This is officially not supported currently.
  • Fixes for miopenforward bias call
  • Modified init conv descriptor param values and used same value for dilation
  • MIOpen: disable transposed convolutions

For attention: @bddppq @ezyang

* Disable MIOpen convolution on double tensors
* MIOpen: set group count in convolution descriptor
* MIOpen: Honor Max Dim (ROCm 222)
* MIOpen: Batchnorm - Allow half/half and half/float, disallow double
* Limit MIOpen batchnorm to same-precision
* Fix maxdim check. (ROCm 246)
* Fix reversed logic in DISABLE_MIOPEN (ROCm 253)
* Export LANG/LC_ALL also for the test step.
* Make tensors contiguous before calling MIOpen batch norm
* Actually pass dilation to MIOpen.
* Do not use MIOpen if there is dilation and the group size is > 1. - This is officially not supported currently.
* Fixes for miopenforward bias call
* Modified init conv descriptor param values and used same value for dilation
* MIOpen: disable transposed convolutions
@iotamudelta
Copy link
Copy Markdown
Contributor Author

@iotamudelta iotamudelta changed the title Enable MIOpen properly [ROCm] Enable MIOpen properly Oct 24, 2018
Comment thread aten/src/ATen/native/Convolution.cpp Outdated
#include "ATen/Config.h"

static const int MIOPEN_DIM_MAX = 4;
static const bool MIOPEN_ENABLED = getenv("DISABLE_MIOPEN") == NULL;

This comment was marked as off-topic.

This comment was marked as off-topic.

Copy link
Copy Markdown
Contributor

@ezyang ezyang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

static initializer getenv is a big nono.

@iotamudelta
Copy link
Copy Markdown
Contributor Author

@ezyang removed debug option

@bddppq bddppq added the module: rocm AMD GPU support for Pytorch label Oct 24, 2018
Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bddppq has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@bddppq bddppq self-requested a review October 25, 2018 05:14
Copy link
Copy Markdown
Contributor

@bddppq bddppq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@ezyang mind taking another look?

zdevito pushed a commit to zdevito/ATen that referenced this pull request Oct 25, 2018
Summary:
* Disable MIOpen convolution on double tensors
* MIOpen: set group count in convolution descriptor
* MIOpen: Honor Max Dim (ROCm 222)
* MIOpen: Batchnorm - Allow half/half and half/float, disallow double
* Limit MIOpen batchnorm to same-precision
* Fix maxdim check. (ROCm 246)
* Fix reversed logic in DISABLE_MIOPEN (ROCm 253)
* Export LANG/LC_ALL also for the test step.
* Make tensors contiguous before calling MIOpen batch norm
* Actually pass dilation to MIOpen.
* Do not use MIOpen if there is dilation and the group size is > 1. - This is officially not supported currently.
* Fixes for miopenforward bias call
* Modified init conv descriptor param values and used same value for dilation
* MIOpen: disable transposed convolutions

For attention: bddppq ezyang
Pull Request resolved: pytorch/pytorch#13048

Differential Revision: D10785250

Pulled By: bddppq

fbshipit-source-id: f9d9797de644652280d59308e5ea5cc07d177fd4
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary:
* Disable MIOpen convolution on double tensors
* MIOpen: set group count in convolution descriptor
* MIOpen: Honor Max Dim (ROCm 222)
* MIOpen: Batchnorm - Allow half/half and half/float, disallow double
* Limit MIOpen batchnorm to same-precision
* Fix maxdim check. (ROCm 246)
* Fix reversed logic in DISABLE_MIOPEN (ROCm 253)
* Export LANG/LC_ALL also for the test step.
* Make tensors contiguous before calling MIOpen batch norm
* Actually pass dilation to MIOpen.
* Do not use MIOpen if there is dilation and the group size is > 1. - This is officially not supported currently.
* Fixes for miopenforward bias call
* Modified init conv descriptor param values and used same value for dilation
* MIOpen: disable transposed convolutions

For attention: bddppq ezyang
Pull Request resolved: pytorch#13048

Differential Revision: D10785250

Pulled By: bddppq

fbshipit-source-id: f9d9797de644652280d59308e5ea5cc07d177fd4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: rocm AMD GPU support for Pytorch open source

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants