Skip to content

[ROCm] improve docker packages, fix bugs, enable tests, enable FFT#10893

Closed
iotamudelta wants to merge 542 commits intopytorch:masterfrom
ROCm:dockerpackages
Closed

[ROCm] improve docker packages, fix bugs, enable tests, enable FFT#10893
iotamudelta wants to merge 542 commits intopytorch:masterfrom
ROCm:dockerpackages

Conversation

@iotamudelta
Copy link
Contributor

  • improve docker packages (install OpenBLAS to have at-compile-time LAPACK functionality w/ optimizations for both Intel and AMD CPUs)
  • integrate rocFFT (i.e., enable Fourier functionality)
  • fix bugs in ROCm caused by wrong warp size
  • enable more test sets, skip the tests that don't work on ROCm yet
  • don't disable asserts any longer in hipification
  • small improvements

iotamudelta and others added 30 commits August 7, 2018 09:48
…RAND_PR

While there, add the remaining changes requested in upstream PR pytorch#10266
Refactor unit test skip statements to use @skipIfRocm annotation
#include "THCDeviceUtils.cuh"

#if defined(__HIP_PLATFORM_HCC__)
#define WARP_SIZE 64

This comment was marked as off-topic.

This comment was marked as off-topic.

sliceSize, \
k, \
inputSlices, \
static_cast<INDEX_T>(sliceSize), \

This comment was marked as off-topic.

This comment was marked as off-topic.

install_ubuntu() {
apt-get update
apt-get install -y wget
apt-get install -y libopenblas-dev

This comment was marked as off-topic.

This comment was marked as off-topic.

TEST_MULTIGPU = TEST_CUDA and torch.cuda.device_count() >= 2
CUDA_DEVICE = TEST_CUDA and torch.device("cuda:0")
TEST_CUDNN = TEST_CUDA and torch.backends.cudnn.is_acceptable(torch.tensor(1., device=CUDA_DEVICE))
TEST_CUDNN = TEST_CUDA and (TEST_WITH_ROCM or torch.backends.cudnn.is_acceptable(torch.tensor(1., device=CUDA_DEVICE)))

This comment was marked as off-topic.

This comment was marked as off-topic.

input_size=(4, 10),
reference_fn=lambda i, p: torch.mm(i, p[0].t()) + p[1].view(1, -1).expand(4, 8)
reference_fn=lambda i, p: torch.mm(i, p[0].t()) + p[1].view(1, -1).expand(4, 8),
test_cuda=(not TEST_WITH_ROCM)

This comment was marked as off-topic.

This comment was marked as off-topic.

tests = [
('add', small_3d, lambda t: [number(3.14, 3, t)]),
('add', small_3d, lambda t: [number(3.14, 3, t)], '', types, False,
"skipIfRocm:ByteTensor,CharTensor,HalfTensor,ShortTensor"),

This comment was marked as off-topic.

This comment was marked as off-topic.

('lerp', small_3d, lambda t: [small_3d(t), 0.3], '', types, False, "skipIfRocm:HalfTensor"),
('max', small_3d_unique, lambda t: [], '', types, False, "skipIfRocm:HalfTensor"),
('max', small_3d_unique, lambda t: [1], 'dim', types, False,
"skipIfRocm:ByteTensor,CharTensor,DoubleTensor,FloatTensor,HalfTensor,IntTensor,LongTensor,ShortTensor"),

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

if not filepath.endswith("THCGeneral.h.in"):
output_source = disable_asserts(output_source)
# if not filepath.endswith("THCGeneral.h.in"):
# output_source = disable_asserts(output_source)

This comment was marked as off-topic.

This comment was marked as off-topic.

Copy link
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.

I'm primarily concerned with two things:

  1. The &sizes in the FFT bindings https://github.com/pytorch/pytorch/pull/10893/files#r214418319 . This just looks totally wrong and I don't want to merge code that's wrong.
  2. The manual specification of each of the types Float/Long/Int/etc... in the tests. This seems really delicate, and it would be much better if we weren't banging these out manually; instead, there should be predefined strings for the most common combinations of types that don't work.

@ezyang
Copy link
Contributor

ezyang commented Aug 31, 2018

@pytorchbot retest this please

Copy link
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.

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

@iotamudelta
Copy link
Contributor Author

@jithunnair-amd can you comment on point no 2? Thanks!

Copy link
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.

ezyang is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

zdevito pushed a commit to zdevito/ATen that referenced this pull request Sep 2, 2018
Summary:
* improve docker packages (install OpenBLAS to have at-compile-time LAPACK functionality w/ optimizations for both Intel and AMD CPUs)
* integrate rocFFT (i.e., enable Fourier functionality)
* fix bugs in ROCm caused by wrong warp size
* enable more test sets, skip the tests that don't work on ROCm yet
* don't disable asserts any longer in hipification
* small improvements
Pull Request resolved: pytorch/pytorch#10893

Differential Revision: D9615053

Pulled By: ezyang

fbshipit-source-id: 864b4d27bf089421f7dfd8065e5017f9ea2f7b3b
PenghuiCheng pushed a commit to PenghuiCheng/pytorch that referenced this pull request Sep 11, 2018
…10893)

Summary:
* improve docker packages (install OpenBLAS to have at-compile-time LAPACK functionality w/ optimizations for both Intel and AMD CPUs)
* integrate rocFFT (i.e., enable Fourier functionality)
* fix bugs in ROCm caused by wrong warp size
* enable more test sets, skip the tests that don't work on ROCm yet
* don't disable asserts any longer in hipification
* small improvements
Pull Request resolved: pytorch#10893

Differential Revision: D9615053

Pulled By: ezyang

fbshipit-source-id: 864b4d27bf089421f7dfd8065e5017f9ea2f7b3b
@iotamudelta iotamudelta deleted the dockerpackages branch October 25, 2018 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants