Skip to content

Commit

Permalink
Revert D20589048: [pytorch][PR] [ROCm] Update CI dockers to ROCm rele…
Browse files Browse the repository at this point in the history
…ase 3.1.1

Test Plan: revert-hammer

Differential Revision:
D20589048

Original commit changeset: 568f40c1b90f

fbshipit-source-id: 724c4fe99e8806f00d2f7dceb71d15a02358f663
  • Loading branch information
ezyang authored and facebook-github-bot committed Mar 26, 2020
1 parent ada4077 commit 3622e1c
Show file tree
Hide file tree
Showing 17 changed files with 19 additions and 253 deletions.
2 changes: 1 addition & 1 deletion .circleci/cimodel/data/caffe2_build_definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

DOCKER_IMAGE_PATH_BASE = "308535385114.dkr.ecr.us-east-1.amazonaws.com/caffe2/"

DOCKER_IMAGE_VERSION = "369"
DOCKER_IMAGE_VERSION = "345"


@dataclass
Expand Down
14 changes: 7 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2422,44 +2422,44 @@ workflows:
requires:
- setup
build_environment: "caffe2-onnx-py2-gcc5-ubuntu16.04-build"
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/caffe2/py2-gcc5-ubuntu16.04:369"
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/caffe2/py2-gcc5-ubuntu16.04:345"
- caffe2_linux_test:
name: caffe2_onnx_py2_gcc5_ubuntu16_04_test
requires:
- setup
- caffe2_onnx_py2_gcc5_ubuntu16_04_build
build_environment: "caffe2-onnx-py2-gcc5-ubuntu16.04-test"
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/caffe2/py2-gcc5-ubuntu16.04:369"
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/caffe2/py2-gcc5-ubuntu16.04:345"
resource_class: large
- caffe2_linux_build:
name: caffe2_onnx_main_py3_6_clang7_ubuntu16_04_build
requires:
- setup
build_environment: "caffe2-onnx-main-py3.6-clang7-ubuntu16.04-build"
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/caffe2/py3.6-clang7-ubuntu16.04:369"
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/caffe2/py3.6-clang7-ubuntu16.04:345"
- caffe2_linux_test:
name: caffe2_onnx_main_py3_6_clang7_ubuntu16_04_test
requires:
- setup
- caffe2_onnx_main_py3_6_clang7_ubuntu16_04_build
build_environment: "caffe2-onnx-main-py3.6-clang7-ubuntu16.04-test"
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/caffe2/py3.6-clang7-ubuntu16.04:369"
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/caffe2/py3.6-clang7-ubuntu16.04:345"
resource_class: large
- caffe2_linux_test:
name: caffe2_onnx_ort1_py3_6_clang7_ubuntu16_04_test
requires:
- setup
- caffe2_onnx_main_py3_6_clang7_ubuntu16_04_build
build_environment: "caffe2-onnx-ort1-py3.6-clang7-ubuntu16.04-test"
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/caffe2/py3.6-clang7-ubuntu16.04:369"
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/caffe2/py3.6-clang7-ubuntu16.04:345"
resource_class: large
- caffe2_linux_test:
name: caffe2_onnx_ort2_py3_6_clang7_ubuntu16_04_test
requires:
- setup
- caffe2_onnx_main_py3_6_clang7_ubuntu16_04_build
build_environment: "caffe2-onnx-ort2-py3.6-clang7-ubuntu16.04-test"
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/caffe2/py3.6-clang7-ubuntu16.04:369"
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/caffe2/py3.6-clang7-ubuntu16.04:345"
resource_class: large
# TODO: Refactor circleci/cimodel/data/binary_build_data.py to generate this file
# instead of doing one offs here
Expand Down Expand Up @@ -6998,7 +6998,7 @@ workflows:
- ecr_gc_job:
name: ecr_gc_job_for_caffe2
project: caffe2
tags_to_keep: "369,348,345,336,325,324,315,306,301,287,283,276,273,266,253,248,238,230,213"
tags_to_keep: "348,345,336,325,324,315,306,301,287,283,276,273,266,253,248,238,230,213"
- ecr_gc_job:
name: ecr_gc_job_for_translate
project: translate
Expand Down
13 changes: 0 additions & 13 deletions .circleci/docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ OS="ubuntu"
DOCKERFILE="${OS}/Dockerfile"
if [[ "$image" == *-cuda* ]]; then
DOCKERFILE="${OS}-cuda/Dockerfile"
elif [[ "$image" == *-rocm* ]]; then
DOCKERFILE="${OS}-rocm/Dockerfile"
fi

if [[ "$image" == *-trusty* ]]; then
Expand Down Expand Up @@ -178,16 +176,6 @@ case "$image" in
DB=yes
VISION=yes
;;
pytorch-linux-xenial-rocm-py3.6-clang7)
ANACONDA_PYTHON_VERSION=3.6
CLANG_VERSION=7
PROTOBUF=yes
DB=yes
VISION=yes
ROCM=yes
# newer cmake version required
CMAKE_VERSION=3.6.3
;;
esac

# Set Jenkins UID and GID if running Jenkins
Expand Down Expand Up @@ -225,7 +213,6 @@ docker build \
--build-arg "CMAKE_VERSION=${CMAKE_VERSION:-}" \
--build-arg "NINJA_VERSION=${NINJA_VERSION:-}" \
--build-arg "KATEX=${KATEX:-}" \
--build-arg "ROCM=${ROCM:-}" \
-f $(dirname ${DOCKERFILE})/Dockerfile \
-t "$tmp_tag" \
"$@" \
Expand Down
75 changes: 0 additions & 75 deletions .circleci/docker/common/install_rocm.sh

This file was deleted.

1 change: 0 additions & 1 deletion .circleci/docker/ubuntu-rocm/.gitignore

This file was deleted.

79 changes: 0 additions & 79 deletions .circleci/docker/ubuntu-rocm/Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion .circleci/verbatim-sources/workflows-ecr-gc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
- ecr_gc_job:
name: ecr_gc_job_for_caffe2
project: caffe2
tags_to_keep: "369,348,345,336,325,324,315,306,301,287,283,276,273,266,253,248,238,230,213"
tags_to_keep: "348,345,336,325,324,315,306,301,287,283,276,273,266,253,248,238,230,213"
- ecr_gc_job:
name: ecr_gc_job_for_translate
project: translate
Expand Down
8 changes: 0 additions & 8 deletions aten/src/ATen/native/cuda/CUDAScalar.cu
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
#include <ATen/cuda/CUDAContext.h>
#include <cuda.h>

#ifdef __HIP_PLATFORM_HCC__
#include <hip/hip_version.h>
#endif

namespace at {
namespace native {

Expand All @@ -17,12 +13,8 @@ Scalar _local_scalar_dense_cuda(const Tensor& self) {
at::ScalarType::Half, at::ScalarType::Bool, at::ScalarType::BFloat16, self.scalar_type(), "_local_scalar_dense_cuda", [&] {
scalar_t value;
cudaStream_t stream = at::cuda::getCurrentCUDAStream();
#if HIP_VERSION >= 301
AT_CUDA_CHECK(hipMemcpyWithStream(&value, self.data_ptr<scalar_t>(), sizeof(scalar_t), cudaMemcpyDeviceToHost, stream));
#else
AT_CUDA_CHECK(cudaMemcpyAsync(&value, self.data_ptr<scalar_t>(), sizeof(scalar_t), cudaMemcpyDeviceToHost, stream));
AT_CUDA_CHECK(cudaStreamSynchronize(stream));
#endif
r = Scalar(value);
});
return r;
Expand Down
12 changes: 2 additions & 10 deletions aten/src/ATen/native/cuda/Copy.cu
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
#include <ATen/native/cuda/Loops.cuh>
#include <THC/THC.h>

#ifdef __HIP_PLATFORM_HCC__
#include <hip/hip_version.h>
#endif

namespace at {
namespace native {

Expand Down Expand Up @@ -181,17 +177,13 @@ static void copy_kernel_cuda(TensorIterator& iter, bool non_blocking) {
int64_t nbytes = iter.numel() * iter.element_size(0);
CUDAStream stream = getCurrentCUDAStream();

AT_CUDA_CHECK(cudaMemcpyAsync(dst, src, nbytes, kind, stream));

if (non_blocking) {
AT_CUDA_CHECK(cudaMemcpyAsync(dst, src, nbytes, kind, stream));
void* ptr = (dst_device == kCPU ? dst : src);
AT_CUDA_CHECK(THCCachingHostAllocator_recordEvent(ptr, stream));
} else {
#if HIP_VERSION >= 301
AT_CUDA_CHECK(hipMemcpyWithStream(dst, src, nbytes, kind, stream));
#else
AT_CUDA_CHECK(cudaMemcpyAsync(dst, src, nbytes, kind, stream));
AT_CUDA_CHECK(cudaStreamSynchronize(stream));
#endif
}
}

Expand Down
12 changes: 0 additions & 12 deletions aten/src/THC/THCReduceAll.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
#include <THC/THCReduceApplyUtils.cuh>
#include <c10/macros/Macros.h>

#ifdef __HIP_PLATFORM_HCC__
#include <hip/hip_version.h>
#endif

// Size per each reduction block
#define THC_REDUCE_ALL_BLOCK_SIZE 1024L

Expand Down Expand Up @@ -324,20 +320,12 @@ bool THC_reduceAll(THCState* state,
// the host (synchronous!)
if (!outOnDevice) {
cudaStream_t stream = c10::cuda::getCurrentCUDAStream();
#if HIP_VERSION >= 301
THCudaCheck(hipMemcpyWithStream(out,
devOut,
sizeof(AccT),
cudaMemcpyDeviceToHost,
stream));
#else
THCudaCheck(cudaMemcpyAsync(out,
devOut,
sizeof(AccT),
cudaMemcpyDeviceToHost,
stream));
THCudaCheck(cudaStreamSynchronize(stream));
#endif
}

if (freeDevOut) {
Expand Down
15 changes: 0 additions & 15 deletions aten/src/THC/generic/THCStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
#include <c10/util/intrusive_ptr.h>
#include <c10/util/typeid.h>

#ifdef __HIP_PLATFORM_HCC__
#include <hip/hip_version.h>
#endif

scalar_t* THCStorage_(data)(THCState *state, const THCStorage *self)
{
return self->data<scalar_t>();
Expand All @@ -28,31 +24,20 @@ void THCStorage_(set)(THCState *state, THCStorage *self, ptrdiff_t index, scalar
{
THArgCheck((index >= 0) && (index < self->numel()), 2, "index out of bounds");
cudaStream_t stream = c10::cuda::getCurrentCUDAStream();
#if HIP_VERSION >= 301
THCudaCheck(hipMemcpyWithStream(THCStorage_(data)(state, self) + index, &value, sizeof(scalar_t),
cudaMemcpyHostToDevice,
stream));
#else
THCudaCheck(cudaMemcpyAsync(THCStorage_(data)(state, self) + index, &value, sizeof(scalar_t),
cudaMemcpyHostToDevice,
stream));
THCudaCheck(cudaStreamSynchronize(stream));
#endif
}

scalar_t THCStorage_(get)(THCState *state, const THCStorage *self, ptrdiff_t index)
{
THArgCheck((index >= 0) && (index < self->numel()), 2, "index out of bounds");
scalar_t value;
cudaStream_t stream = c10::cuda::getCurrentCUDAStream();
#if HIP_VERSION >= 301
THCudaCheck(hipMemcpyWithStream(&value, THCStorage_(data)(state, self) + index, sizeof(scalar_t),
cudaMemcpyDeviceToHost, stream));
#else
THCudaCheck(cudaMemcpyAsync(&value, THCStorage_(data)(state, self) + index, sizeof(scalar_t),
cudaMemcpyDeviceToHost, stream));
THCudaCheck(cudaStreamSynchronize(stream));
#endif
return value;
}

Expand Down
Loading

0 comments on commit 3622e1c

Please sign in to comment.