Skip to content

[WIP] Enable disabled functions for ROCm #252

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

Merged
merged 10 commits into from
Oct 9, 2018
Merged
2 changes: 1 addition & 1 deletion aten/src/THC/THCNumerics.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ struct THCNumerics<at::Half> {
static inline __host__ __device__ at::Half round(at::Half a) { return ::round(a); }

static inline __host__ __device__ at::Half frac(at::Half a) {
#ifdef __CUDA_ARCH__
#if defined(__CUDA_ARCH__) || defined(__HIP_PLATFORM_HCC__)
return a - ::trunc(a);
#else // __CUDA_ARCH__
return a - ::floor(a);
Expand Down
4 changes: 4 additions & 0 deletions aten/src/THCUNN/LookupTable.cu
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
#include "THCTensorSort.cuh"
#include "../THC/THCTensorMathReduce.cuh"

#ifdef __HIP_PLATFORM_HCC__
const int WARP_SIZE = 64;
#else
const int WARP_SIZE = 32;
#endif

template
<typename Dtype,
Expand Down
27 changes: 0 additions & 27 deletions tools/amd_build/disabled_features.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,31 +32,12 @@
"_OPENMP": "_OPENMP_STUB"
}
},
{
"path": "aten/src/ATen/Context.cpp",
"s_constants": {
"#ifdef USE_SSE3": "#if defined(USE_SSE3) && !defined(__HIP_DEVICE_COMPILE__)"
}
},
{
"path": "aten/src/ATen/native/Distributions.h",
"s_constants": {
"scalar_cast": "static_cast"
}
},
{
"path": "aten/src/ATen/native/cuda/Distributions.cu",
"s_constants": {
"#include <nvfunctional>": ""
}
},
{
"path": "aten/src/THC/THCNumerics.cuh",
"s_constants": {
"#ifdef __CUDA_ARCH__": "#if defined(__CUDA_ARCH__) || defined(__HIP_PLATFORM_HCC__)",
"#if CUDA_VERSION < 9000": "#if CUDA_VERSION < 9000 && !defined(__HIP_PLATFORM_HCC__)"
}
},
{
"path": "aten/src/ATen/native/cuda/RoiPooling.cu",
"s_constants": {
Expand Down Expand Up @@ -144,8 +125,6 @@
{
"path": "aten/src/ATen/native/cuda/Distributions.cu",
"functions": [
"_s_poisson_cuda",
"poisson_cuda_kernel",
"gamma_cuda_kernel",
"gamma_grad_cuda_kernel",
]
Expand All @@ -164,12 +143,6 @@
"THNN_(LookupTable_renorm)"
]
},
{
"path": "aten/src/THCUNN/LookupTable.cu",
"functions": [
"calculate_norms_and_renorm"
]
},
{
"path": "aten/src/THC/generic/THCTensor.cu",
"functions": [
Expand Down