Skip to content

Commit ee6a3f1

Browse files
author
Zafar
committed
Update on "[quant] Fix ConvTranspose mapping"
Differential Revision: [D23746466](https://our.internmc.facebook.com/intern/diff/D23746466) [ghstack-poisoned]
2 parents 7fe42ed + 24f22b1 commit ee6a3f1

474 files changed

Lines changed: 13594 additions & 4520 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/cimodel/data/windows_build_definitions.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,7 @@ def FalsePred(_):
124124
def TruePred(_):
125125
return True
126126

127-
# MKLDNN compilation fails with VC-19.27
128-
_VC2019 = VcSpec(2019, ["14", "26"], hide_version=True)
127+
_VC2019 = VcSpec(2019)
129128

130129
WORKFLOW_DATA = [
131130
# VS2019 CUDA-10.1

.circleci/config.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,19 @@ executors:
2323
windows-with-nvidia-gpu:
2424
machine:
2525
resource_class: windows.gpu.nvidia.medium
26-
image: windows-server-2019-nvidia:canary
26+
image: windows-server-2019-nvidia:stable
2727
shell: bash.exe
2828

2929
windows-xlarge-cpu-with-nvidia-cuda:
3030
machine:
3131
resource_class: windows.xlarge
32-
image: windows-server-2019-vs2019:canary
32+
image: windows-server-2019-vs2019:stable
3333
shell: bash.exe
3434

3535
windows-medium-cpu-with-nvidia-cuda:
3636
machine:
3737
resource_class: windows.medium
38-
image: windows-server-2019-vs2019:canary
38+
image: windows-server-2019-vs2019:stable
3939
shell: bash.exe
4040
commands:
4141

@@ -7109,7 +7109,7 @@ workflows:
71097109
python_version: "3.6"
71107110
use_cuda: "1"
71117111
vc_product: Community
7112-
vc_version: "14.26"
7112+
vc_version: ""
71137113
vc_year: "2019"
71147114
- pytorch_windows_test:
71157115
build_environment: pytorch-win-vs2019-cuda10-cudnn7-py3
@@ -7122,7 +7122,7 @@ workflows:
71227122
test_name: pytorch-windows-test1
71237123
use_cuda: "1"
71247124
vc_product: Community
7125-
vc_version: "14.26"
7125+
vc_version: ""
71267126
vc_year: "2019"
71277127
- pytorch_windows_test:
71287128
build_environment: pytorch-win-vs2019-cuda10-cudnn7-py3
@@ -7135,7 +7135,7 @@ workflows:
71357135
test_name: pytorch-windows-test2
71367136
use_cuda: "1"
71377137
vc_product: Community
7138-
vc_version: "14.26"
7138+
vc_version: ""
71397139
vc_year: "2019"
71407140
- pytorch_windows_build:
71417141
build_environment: pytorch-win-vs2019-cuda11-cudnn8-py3
@@ -7144,7 +7144,7 @@ workflows:
71447144
python_version: "3.6"
71457145
use_cuda: "1"
71467146
vc_product: Community
7147-
vc_version: "14.26"
7147+
vc_version: ""
71487148
vc_year: "2019"
71497149
- pytorch_windows_test:
71507150
build_environment: pytorch-win-vs2019-cuda11-cudnn8-py3
@@ -7163,7 +7163,7 @@ workflows:
71637163
test_name: pytorch-windows-test1
71647164
use_cuda: "1"
71657165
vc_product: Community
7166-
vc_version: "14.26"
7166+
vc_version: ""
71677167
vc_year: "2019"
71687168
- pytorch_windows_test:
71697169
build_environment: pytorch-win-vs2019-cuda11-cudnn8-py3
@@ -7182,7 +7182,7 @@ workflows:
71827182
test_name: pytorch-windows-test2
71837183
use_cuda: "1"
71847184
vc_product: Community
7185-
vc_version: "14.26"
7185+
vc_version: ""
71867186
vc_year: "2019"
71877187
- pytorch_windows_build:
71887188
build_environment: pytorch-win-vs2019-cpu-py3
@@ -7191,7 +7191,7 @@ workflows:
71917191
python_version: "3.6"
71927192
use_cuda: "0"
71937193
vc_product: Community
7194-
vc_version: "14.26"
7194+
vc_version: ""
71957195
vc_year: "2019"
71967196
- pytorch_windows_test:
71977197
build_environment: pytorch-win-vs2019-cpu-py3
@@ -7209,7 +7209,7 @@ workflows:
72097209
test_name: pytorch-windows-test1
72107210
use_cuda: "0"
72117211
vc_product: Community
7212-
vc_version: "14.26"
7212+
vc_version: ""
72137213
vc_year: "2019"
72147214
- pytorch_windows_test:
72157215
build_environment: pytorch-win-vs2019-cpu-py3
@@ -7227,7 +7227,7 @@ workflows:
72277227
test_name: pytorch-windows-test2
72287228
use_cuda: "0"
72297229
vc_product: Community
7230-
vc_version: "14.26"
7230+
vc_version: ""
72317231
vc_year: "2019"
72327232
- pytorch_windows_test:
72337233
build_environment: pytorch-win-vs2019-cuda10-cudnn7-py3
@@ -7245,7 +7245,7 @@ workflows:
72457245
test_name: pytorch-windows-test1
72467246
use_cuda: "0"
72477247
vc_product: Community
7248-
vc_version: "14.26"
7248+
vc_version: ""
72497249
vc_year: "2019"
72507250
- update_s3_htmls:
72517251
context: org-member

.circleci/scripts/binary_linux_build.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ set -eux -o pipefail
55
source /env
66

77
# Defaults here so they can be changed in one place
8-
# This script is run inside Docker.2XLarge+ container that has 20 CPU cores
9-
# But ncpu will return total number of cores on the system
10-
export MAX_JOBS=18
8+
export MAX_JOBS=${MAX_JOBS:-$(( $(nproc) - 2 ))}
119

1210
# Parse the parameters
1311
if [[ "$PACKAGE_TYPE" == 'conda' ]]; then

.circleci/verbatim-sources/header-section.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@ executors:
2323
windows-with-nvidia-gpu:
2424
machine:
2525
resource_class: windows.gpu.nvidia.medium
26-
image: windows-server-2019-nvidia:canary
26+
image: windows-server-2019-nvidia:stable
2727
shell: bash.exe
2828

2929
windows-xlarge-cpu-with-nvidia-cuda:
3030
machine:
3131
resource_class: windows.xlarge
32-
image: windows-server-2019-vs2019:canary
32+
image: windows-server-2019-vs2019:stable
3333
shell: bash.exe
3434

3535
windows-medium-cpu-with-nvidia-cuda:
3636
machine:
3737
resource_class: windows.medium
38-
image: windows-server-2019-vs2019:canary
38+
image: windows-server-2019-vs2019:stable
3939
shell: bash.exe

.jenkins/pytorch/win-test-helpers/run_python_nn_smoketests.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/usr/bin/env python
22

3-
from __future__ import print_function
4-
53
import subprocess
64
import os
75

BUILD.bazel

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,10 +331,12 @@ filegroup(
331331
name = "aten_cuda_srcs",
332332
srcs = [
333333
"aten/src/ATen/cuda/CUDABlas.cpp",
334+
"aten/src/ATen/cuda/CUDASolver.cpp",
334335
"aten/src/ATen/cuda/CUDAContext.cpp",
335336
"aten/src/ATen/cuda/CUDAGenerator.cpp",
336337
"aten/src/ATen/cuda/CuSparseHandlePool.cpp",
337338
"aten/src/ATen/cuda/CublasHandlePool.cpp",
339+
"aten/src/ATen/cuda/CusolverDnHandlePool.cpp",
338340
"aten/src/ATen/cuda/PinnedMemoryAllocator.cpp",
339341
"aten/src/ATen/cuda/detail/CUDAHooks.cpp",
340342
"aten/src/ATen/cudnn/AutocastRNN.cpp",
@@ -459,6 +461,7 @@ filegroup(
459461
"aten/src/ATen/native/cuda/AveragePool2d.cu.cc",
460462
"aten/src/ATen/native/cuda/AveragePool3d.cu.cc",
461463
"aten/src/ATen/native/cuda/BatchLinearAlgebra.cu.cc",
464+
"aten/src/ATen/native/cuda/BatchLinearAlgebraLib.cu.cc",
462465
"aten/src/ATen/native/cuda/BinaryArithmeticKernel.cu.cc",
463466
"aten/src/ATen/native/cuda/BinaryCompareKernel.cu.cc",
464467
"aten/src/ATen/native/cuda/BinaryMiscOpsKernels.cu.cc",

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ option(USE_TENSORRT "Using Nvidia TensorRT library" OFF)
201201
option(USE_VULKAN "Use Vulkan GPU backend" OFF)
202202
option(USE_VULKAN_WRAPPER "Use Vulkan wrapper" ON)
203203
option(USE_VULKAN_SHADERC_RUNTIME "Use Vulkan Shader compilation runtime(Needs shaderc lib)" OFF)
204+
option(USE_VULKAN_RELAXED_PRECISION "Use Vulkan relaxed precision(mediump)" OFF)
204205
option(USE_XNNPACK "Use XNNPACK" ON)
205206
option(USE_ZMQ "Use ZMQ" OFF)
206207
option(USE_ZSTD "Use ZSTD" OFF)
@@ -513,6 +514,10 @@ if(USE_VULKAN_SHADERC_RUNTIME)
513514
string(APPEND CMAKE_CXX_FLAGS " -DUSE_VULKAN_SHADERC_RUNTIME")
514515
endif()
515516

517+
if(USE_VULKAN_RELAXED_PRECISION)
518+
string(APPEND CMAKE_CXX_FLAGS " -DUSE_VULKAN_RELAXED_PRECISION")
519+
endif()
520+
516521
# ---[ Allowlist file if allowlist is specified
517522
include(cmake/Allowlist.cmake)
518523

CODEOWNERS

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44
/docs/cpp @goldsborough @ebetica @yf225
55
/torch/csrc/api/ @ebetica @goldsborough @yf225
66
/test/cpp/api/ @ebetica @goldsborough @yf225
7-
/torch/lib/c10d/ @pietern @mrshenli @zhaojuanmao
8-
/torch/csrc/distributed/ @pietern @mrshenli @zhaojuanmao
9-
/torch/distributed/ @apaszke @pietern @mrshenli @zhaojuanmao
10-
/test/test_c10d.py @pietern @mrshenli @zhaojuanmao
117
/torch/utils/cpp_extension.py @goldsborough @fmassa @soumith @ezyang
128

139
# Not there to strictly require the approval, but to be tagged as a reviewer
@@ -20,17 +16,19 @@
2016
/torch/jit/ @apaszke
2117
/torch/utils/data/ @apaszke
2218

23-
# Distributed RPC Framework.
24-
/torch/csrc/distributed/rpc @mrshenli @pritamdamania87 @zhaojuanmao
25-
/torch/csrc/distributed/autograd @mrshenli @pritamdamania87 @zhaojuanmao
26-
/torch/distributed/rpc @mrshenli @pritamdamania87 @zhaojuanmao
27-
/torch/distributed/autograd @mrshenli @pritamdamania87 @zhaojuanmao
28-
/torch/distributed/optim @mrshenli @pritamdamania87 @zhaojuanmao @aazzolini
29-
3019
# Tensorpipe RPC Agent.
3120
/torch/csrc/distributed/rpc/tensorpipe_agent.cpp @jiayisuse @osalpekar @lw @beauby
3221
/torch/csrc/distributed/rpc/tensorpipe_agent.h @jiayisuse @osalpekar @lw @beauby
3322

23+
# Distributed package
24+
# This list is mostly if you'd like to be tagged as reviewer, feel free to add
25+
# or remove yourself from it.
26+
/torch/lib/c10d/ @pietern @mrshenli @zhaojuanmao @pritamdamania87 @rohan-varma
27+
/torch/csrc/distributed/ @pietern @mrshenli @zhaojuanmao @pritamdamania87 @rohan-varma
28+
/torch/distributed/ @apaszke @pietern @mrshenli @zhaojuanmao @pritamdamania87 @rohan-varma
29+
3430
# Distributed tests
35-
/test/distributed @mrshenli @pritamdamania87 @zhaojuanmao
36-
/torch/testing/_internal/distributed @mrshenli @pritamdamania87 @zhaojuanmao
31+
# This list is mostly if you'd like to be tagged as reviewer, feel free to add
32+
# or remove yourself from it.
33+
/test/distributed @mrshenli @pritamdamania87 @zhaojuanmao @rohan-varma
34+
/torch/testing/_internal/distributed @mrshenli @pritamdamania87 @zhaojuanmao @rohan-varma

CONTRIBUTING.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -825,8 +825,9 @@ static_assert(std::is_same(A*, decltype(A::singleton()))::value, "hmm");
825825
826826
[Clang-Tidy](https://clang.llvm.org/extra/clang-tidy/index.html) is a C++
827827
linter and static analysis tool based on the clang compiler. We run clang-tidy
828-
in our CI to make sure that new C++ code is safe, sane and efficient. See our
829-
[.travis.yml](https://github.com/pytorch/pytorch/blob/master/.travis.yml) file
828+
in our CI to make sure that new C++ code is safe, sane and efficient. See the
829+
[`clang-tidy` job in our GitHub Workflow's
830+
lint.yml file](https://github.com/pytorch/pytorch/blob/master/.github/workflows/lint.yml)
830831
for the simple commands we use for this.
831832
832833
To run clang-tidy locally, follow these steps:

android/pytorch_android/src/main/cpp/pytorch_jni_common.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,10 @@ facebook::jni::local_ref<JIValue> JIValue::newJIValueFromAtIValue(
289289
JIValue::javaClassStatic()
290290
->getStaticMethod<facebook::jni::local_ref<JIValue>(
291291
facebook::jni::local_ref<TensorHybrid::javaobject>)>("from");
292+
const auto& tensor = ivalue.toTensor();
292293
return jMethodTensor(
293294
JIValue::javaClassStatic(),
294-
TensorHybrid::newJTensorFromAtTensor(ivalue.toTensor()));
295+
TensorHybrid::newJTensorFromAtTensor(tensor.cpu()));
295296
} else if (ivalue.isBool()) {
296297
static auto jMethodBool =
297298
JIValue::javaClassStatic()

0 commit comments

Comments
 (0)