Skip to content

Commit

Permalink
Revert "Update Cutlass to v2.11 (pytorch#94188)"
Browse files Browse the repository at this point in the history
This reverts commit a0f9abd.

Reverted pytorch#94188 on behalf of https://github.com/ezyang due to bouncing this to derisk branch cut
  • Loading branch information
pytorchmergebot committed Feb 13, 2023
1 parent f70ba23 commit 36dfbb0
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ cc_library(
torch_cuda_half_options = [
"-DCUDA_HAS_FP16=1",
"-D__CUDA_NO_HALF_OPERATORS__",
"-D__CUDA_NO_HALF_CONVERSIONS__",
"-D__CUDA_NO_BFLOAT16_CONVERSIONS__",
"-D__CUDA_NO_HALF2_OPERATORS__",
]
Expand Down
4 changes: 2 additions & 2 deletions aten/src/ATen/native/cuda/KernelUtils.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ __device__ __forceinline__ void fastSpecializedAtomicAdd(

if (low_byte && index < (numel - 1)) {
__half2 value2;
value2.x = static_cast<__half>(value);
value2.x = value;
value2.y = __int2half_rz(0);
atomicAdd(reinterpret_cast<__half2*>(target_addr), value2);

} else if (!low_byte && index > 0) {
__half2 value2;
value2.x = __int2half_rz(0);
value2.y = static_cast<__half>(value);
value2.y = value;
atomicAdd(reinterpret_cast<__half2*>(target_addr - 1), value2);

} else {
Expand Down
2 changes: 1 addition & 1 deletion aten/src/ATen/test/cuda_half_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ __device__ void test(){

__half a = __float2half(3.0f);
__half b = __float2half(2.0f);
__half c = Half(a) - Half(b);
__half c = a - Half(b);
assert(static_cast<Half>(c) == Half(1.0));

// asserting if the functions used on
Expand Down
1 change: 1 addition & 0 deletions cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1653,6 +1653,7 @@ if(NOT INTERN_BUILD_MOBILE)
message(STATUS "Found CUDA with FP16 support, compiling with torch.cuda.HalfTensor")
string(APPEND CMAKE_CUDA_FLAGS " -DCUDA_HAS_FP16=1"
" -D__CUDA_NO_HALF_OPERATORS__"
" -D__CUDA_NO_HALF_CONVERSIONS__"
" -D__CUDA_NO_HALF2_OPERATORS__"
" -D__CUDA_NO_BFLOAT16_CONVERSIONS__")

Expand Down
2 changes: 1 addition & 1 deletion third_party/cutlass
Submodule cutlass updated 1390 files
1 change: 1 addition & 0 deletions torch/utils/cpp_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ def _join_rocm_home(*paths) -> str:

COMMON_NVCC_FLAGS = [
'-D__CUDA_NO_HALF_OPERATORS__',
'-D__CUDA_NO_HALF_CONVERSIONS__',
'-D__CUDA_NO_BFLOAT16_CONVERSIONS__',
'-D__CUDA_NO_HALF2_OPERATORS__',
'--expt-relaxed-constexpr'
Expand Down

0 comments on commit 36dfbb0

Please sign in to comment.