Skip to content

Commit

Permalink
remove nnpack integration from the codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
mshr-h committed Sep 14, 2024
1 parent cbfc1f0 commit ae093b0
Show file tree
Hide file tree
Showing 29 changed files with 0 additions and 1,577 deletions.
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ tvm_option(USE_MIOPEN "Build with ROCM:MIOpen" OFF)
tvm_option(USE_ROCBLAS "Build with ROCM:RoCBLAS" OFF)
tvm_option(USE_HIPBLAS "Build with ROCM:HIPBLAS" OFF)
tvm_option(USE_SORT "Build with sort support" ON)
tvm_option(USE_NNPACK "Build with nnpack support" OFF)
tvm_option(USE_LIBTORCH "Build with libtorch support" OFF)
tvm_option(USE_RANDOM "Build with random support" ON)
tvm_option(USE_MICRO_STANDALONE_RUNTIME "Build with micro.standalone_runtime support" OFF)
Expand Down Expand Up @@ -591,7 +590,6 @@ include(cmake/modules/contrib/Posit.cmake)
include(cmake/modules/contrib/MicroStandaloneRuntime.cmake)
include(cmake/modules/contrib/MSCCLPP.cmake)
include(cmake/modules/contrib/Sort.cmake)
include(cmake/modules/contrib/NNPack.cmake)
include(cmake/modules/contrib/LibTorch.cmake)
include(cmake/modules/contrib/HybridDump.cmake)
include(cmake/modules/contrib/TFLite.cmake)
Expand Down
1 change: 0 additions & 1 deletion cmake/modules/LibInfo.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ function(add_lib_info src_file)
TVM_INFO_USE_MKL="${USE_MKL}"
TVM_INFO_USE_MRVL="${USE_MRVL}"
TVM_INFO_USE_MSVC_MT="${USE_MSVC_MT}"
TVM_INFO_USE_NNPACK="${USE_NNPACK}"
TVM_INFO_USE_OPENCL="${USE_OPENCL}"
TVM_INFO_USE_OPENCL_ENABLE_HOST_PTR="${USE_OPENCL_ENABLE_HOST_PTR}"
TVM_INFO_USE_OPENCL_GTEST="${USE_OPENCL_GTEST}"
Expand Down
38 changes: 0 additions & 38 deletions cmake/modules/contrib/NNPack.cmake

This file was deleted.

37 changes: 0 additions & 37 deletions docker/install/ubuntu_install_nnpack.sh

This file was deleted.

7 changes: 0 additions & 7 deletions docs/reference/api/python/contrib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,6 @@ tvm.contrib.ndk
.. automodule:: tvm.contrib.ndk
:members:


tvm.contrib.nnpack
~~~~~~~~~~~~~~~~~~
.. automodule:: tvm.contrib.nnpack
:members:


tvm.contrib.nvcc
~~~~~~~~~~~~~~~~
.. automodule:: tvm.contrib.nvcc
Expand Down
19 changes: 0 additions & 19 deletions include/tvm/relay/attrs/nn.h
Original file line number Diff line number Diff line change
Expand Up @@ -282,25 +282,6 @@ struct Conv2DWinogradAttrs : public tvm::AttrsNode<Conv2DWinogradAttrs> {
}
};

/*! \brief Attributes used in winograd weight transformation operators */
struct Conv2DWinogradNNPACKWeightTransformAttrs
: public tvm::AttrsNode<Conv2DWinogradNNPACKWeightTransformAttrs> {
int convolution_algorithm;
DataType out_dtype;

TVM_DECLARE_ATTRS(Conv2DWinogradNNPACKWeightTransformAttrs,
"relay.attrs.Conv2DWinogradNNPACKWeightTransformAttrs") {
TVM_ATTR_FIELD(convolution_algorithm)
.describe(
"The convolution algorithm for Winograd NNPACK. "
"E.g. tvm.contrib.nnpack.ConvolutionAlgorithm.WT_8x8 for WT_8x8, "
"tvm.contrib.nnpack.ConvolutionAlgorithm.WT_8x8_FP16 for WT_8x8_FP16");
TVM_ATTR_FIELD(out_dtype)
.set_default(NullValue<DataType>())
.describe("Output data type, set to explicit type under mixed precision setting");
}
};

/*! \brief Attributes used in convolution operators */
struct Conv3DAttrs : public tvm::AttrsNode<Conv3DAttrs> {
Array<IndexExpr> strides;
Expand Down
235 changes: 0 additions & 235 deletions python/tvm/contrib/nnpack.py

This file was deleted.

16 changes: 0 additions & 16 deletions python/tvm/relay/op/nn/_nn.py
Original file line number Diff line number Diff line change
Expand Up @@ -820,22 +820,6 @@ def compute_contrib_conv2d_winograd_weight_transform(attrs, inputs, out_dtype):
)


@reg.register_compute("nn.contrib_conv2d_winograd_nnpack_weight_transform")
def compute_contrib_conv2d_winograd_nnpack_weight_transform(attrs, inputs, out_dtype):
"""Compute definition of contrib_conv2d_winograd_nnpack_weight_transform"""
convolution_algorithm = attrs.get_int("convolution_algorithm")
out = topi.nn.conv2d_winograd_nnpack_weight_transform(
inputs[0], convolution_algorithm, out_dtype
)
return [out]


reg.register_schedule(
"nn.contrib_conv2d_winograd_nnpack_weight_transform",
strategy.schedule_conv2d_winograd_nnpack_weight_transform,
)


# conv2d_NCHWc
reg.register_strategy("nn.contrib_conv2d_NCHWc", strategy.conv2d_NCHWc_strategy)

Expand Down
Loading

0 comments on commit ae093b0

Please sign in to comment.