Skip to content

Commit

Permalink
Kill THCUNN (pytorch#63429)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: pytorch#63429

Test Plan: Imported from OSS

Reviewed By: mruberry

Differential Revision: D30441308

Pulled By: ngimel

fbshipit-source-id: 3ae342a2f8d5c7f8827b637c4055c5d1b0a1be26
  • Loading branch information
peterbell10 authored and facebook-github-bot committed Aug 23, 2021
1 parent db1b27f commit 560cd88
Show file tree
Hide file tree
Showing 22 changed files with 2 additions and 376 deletions.
18 changes: 0 additions & 18 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -409,21 +409,6 @@ filegroup(
],
)

filegroup(
name = "thcunn_srcs_cu",
srcs = [
"aten/src/THCUNN/BCECriterion.cu.cc",
"aten/src/THCUNN/ELU.cu.cc",
"aten/src/THCUNN/HardTanh.cu.cc",
"aten/src/THCUNN/LeakyReLU.cu.cc",
"aten/src/THCUNN/MultiMarginCriterion.cu.cc",
"aten/src/THCUNN/SoftMarginCriterion.cu.cc",
"aten/src/THCUNN/SoftPlus.cu.cc",
"aten/src/THCUNN/SoftShrink.cu.cc",
"aten/src/THCUNN/Tanh.cu.cc",
],
)

filegroup(
name = "aten_srcs_cu",
srcs = [
Expand Down Expand Up @@ -573,8 +558,6 @@ cc_library(
"aten/src/THC/**/*.cpp",
"aten/src/THC/*.cuh",
"aten/src/THC/generic/*.cu.cc",
"aten/src/THCUNN/*.cuh",
"aten/src/THCUNN/generic/*.cu.cc",
],
exclude = [
"aten/src/ATen/Config.h",
Expand Down Expand Up @@ -716,7 +699,6 @@ cu_library(
srcs = [
":aten_srcs_cu",
":thc_srcs_cu",
":thcunn_srcs_cu",
],
copts = ATEN_COPTS + torch_cuda_half_options,
visibility = ["//visibility:public"],
Expand Down
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,7 @@ into the repo directory.
* [aten](aten) - C++ tensor library for PyTorch (no autograd support)
* [src](aten/src) - [README](aten/src/README.md)
* [TH](aten/src/TH)
[THC](aten/src/THC)
[THCUNN](aten/src/THCUNN) - Legacy library code from the original
[THC](aten/src/THC) - Legacy library code from the original
Torch. Try not to add things here; we're slowly porting these to
[native](aten/src/ATen/native).
* generic - Contains actual implementations of operators,
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ We hope you never spend hours debugging your code because of bad stack traces or
PyTorch has minimal framework overhead. We integrate acceleration libraries
such as [Intel MKL](https://software.intel.com/mkl) and NVIDIA ([cuDNN](https://developer.nvidia.com/cudnn), [NCCL](https://developer.nvidia.com/nccl)) to maximize speed.
At the core, its CPU and GPU Tensor and neural network backends
(TH, THC, THNN, THCUNN) are mature and have been tested for years.
are mature and have been tested for years.

Hence, PyTorch is quite fast – whether you run small or large neural networks.

Expand Down
7 changes: 0 additions & 7 deletions aten/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,14 @@ if(USE_ROCM)
# ATen proper)
set(AT_CUDA_ENABLED 1)
add_subdirectory(src/THH)
add_subdirectory(src/THHUNN)
message("ROCm is enabled.")
elseif(USE_CUDA)
set(AT_CUDA_ENABLED 1)
add_subdirectory(src/THC)
add_subdirectory(src/THCUNN)
else()
message("disabling CUDA because USE_CUDA is set false")
set(AT_CUDA_ENABLED 0)
endif()
if(NOT USE_CUDA)
# we still parse THCUNN even if cuda is disabled to make sure to
# install it
install(FILES src/THCUNN/generic/THCUNN.h DESTINATION "${ATEN_INSTALL_INCLUDE_SUBDIR}/THCUNN/generic")
endif()

if(NOT USE_NNPACK)
set(AT_NNPACK_ENABLED 0)
Expand Down
1 change: 0 additions & 1 deletion aten/src/ATen/TensorUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ bool geometry_is_contiguous(IntArrayRef sizes, IntArrayRef strides) {
return contig_if_nonempty;
}

// Correspond to THCUNN_check_dim_size/THNN_check_dim_size
void check_dim_size(
const Tensor& tensor,
int64_t dim,
Expand Down
1 change: 0 additions & 1 deletion aten/src/ATen/TensorUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ TORCH_API void* maybe_data_ptr(const TensorArg& tensor);
// on whether a subgeometry is contiguous.
TORCH_API bool geometry_is_contiguous(IntArrayRef sizes, IntArrayRef strides);

// Correspond to THCUNN_check_dim_size/THNN_check_dim_size
TORCH_API void check_dim_size(
const Tensor& tensor,
int64_t dim,
Expand Down
1 change: 0 additions & 1 deletion aten/src/ATen/cuda/LegacyTHFunctionsCUDA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include <ATen/ExpandUtils.h>
#include <THC/THC.h>
#include <THC/THCTensor.hpp>
#include <THCUNN/THCUNN.h>
#undef THNN_
#undef THCIndexTensor_
#include <ATen/DeviceGuard.h>
Expand Down
3 changes: 0 additions & 3 deletions aten/src/ATen/cuda/detail/KernelUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

#include <ATen/ATen.h>

// Contents of this file are copied from THCUNN/common.h for the ease of porting
// THCUNN functions into ATen.

namespace at { namespace cuda { namespace detail {

// CUDA: grid stride looping
Expand Down
1 change: 0 additions & 1 deletion aten/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ multiple variants of the library, summarized here:
* TH = TorcH
* THC = TorcH Cuda
* THCS = TorcH Cuda Sparse (now defunct)
* THCUNN = TorcH CUda Neural Network (see cunn)
* THNN = TorcH Neural Network (now defunct)
* THS = TorcH Sparse (now defunct)

Expand Down
10 changes: 0 additions & 10 deletions aten/src/THCUNN/CMakeLists.txt

This file was deleted.

26 changes: 0 additions & 26 deletions aten/src/THCUNN/README.md

This file was deleted.

43 changes: 0 additions & 43 deletions aten/src/THCUNN/SharedMem.cuh

This file was deleted.

38 changes: 0 additions & 38 deletions aten/src/THCUNN/THCHalfAutoNumerics.cuh

This file was deleted.

13 changes: 0 additions & 13 deletions aten/src/THCUNN/THCUNN.h

This file was deleted.

83 changes: 0 additions & 83 deletions aten/src/THCUNN/common.h

This file was deleted.

26 changes: 0 additions & 26 deletions aten/src/THCUNN/doc/api_reference.md

This file was deleted.

Loading

0 comments on commit 560cd88

Please sign in to comment.