Skip to content

Commit f9375ff

Browse files
authored
Merge pull request #2 from pytorch-labs/cleanup1
Headers and gitignore
2 parents fa7f689 + e211e6e commit f9375ff

17 files changed

+420
-0
lines changed

.gitignore

Lines changed: 366 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,366 @@
1+
# READ THIS BEFORE YOU REFACTOR ME
2+
#
3+
# setup.py uses the list of patterns in this file to decide
4+
# what to delete, but it's not 100% sound. So, for example,
5+
# if you delete aten/build/ because it's redundant with build/,
6+
# aten/build/ will stop being cleaned. So be careful when
7+
# refactoring this file!
8+
9+
## PyTorch
10+
11+
.coverage
12+
coverage.xml
13+
.dmypy.json
14+
.gradle
15+
.hypothesis
16+
.mypy_cache
17+
/.extracted_scripts/
18+
**/.pytorch_specified_test_cases.csv
19+
**/.pytorch-disabled-tests.json
20+
**/.pytorch-slow-tests.json
21+
**/.pytorch-test-times.json
22+
**/.pytorch-test-file-ratings.json
23+
*/*.pyc
24+
*/*.so*
25+
*/**/__pycache__
26+
*/**/*.dylib*
27+
*/**/*.pyc
28+
*/**/*.pyd
29+
*/**/*.so*
30+
*/**/**/*.pyc
31+
*/**/**/**/*.pyc
32+
*/**/**/**/**/*.pyc
33+
aten/build/
34+
aten/src/ATen/Config.h
35+
aten/src/ATen/cuda/CUDAConfig.h
36+
benchmarks/.data
37+
caffe2/cpp_test/
38+
dist/
39+
docs/build/
40+
docs/cpp/src
41+
docs/src/**/*
42+
docs/cpp/build
43+
docs/cpp/source/api
44+
docs/cpp/source/html/
45+
docs/cpp/source/latex/
46+
docs/source/compile/generated/
47+
docs/source/generated/
48+
docs/source/compile/generated/
49+
log
50+
usage_log.txt
51+
test-reports/
52+
test/*.bak
53+
test/**/*.bak
54+
test/.coverage
55+
test/.hypothesis/
56+
test/cpp/api/mnist
57+
test/custom_operator/model.pt
58+
test/jit_hooks/*.pt
59+
test/data/legacy_modules.t7
60+
test/data/*.pt
61+
test/forward_backward_compatibility/nightly_schemas.txt
62+
dropout_model.pt
63+
test/generated_type_hints_smoketest.py
64+
test/htmlcov
65+
test/cpp_extensions/install/
66+
third_party/build/
67+
tools/coverage_plugins_package/pip-wheel-metadata/
68+
tools/shared/_utils_internal.py
69+
tools/fast_nvcc/wrap_nvcc.sh
70+
tools/fast_nvcc/wrap_nvcc.bat
71+
tools/fast_nvcc/tmp/
72+
torch.egg-info/
73+
torch/_C/__init__.pyi
74+
torch/_C/_nn.pyi
75+
torch/_C/_VariableFunctions.pyi
76+
torch/_VF.pyi
77+
torch/return_types.pyi
78+
torch/nn/functional.pyi
79+
torch/utils/data/datapipes/datapipe.pyi
80+
torch/csrc/autograd/generated/*
81+
torch/csrc/lazy/generated/*.[!m]*
82+
torch_compile_debug/
83+
# Listed manually because some files in this directory are not generated
84+
torch/testing/_internal/generated/annotated_fn_args.py
85+
torch/testing/_internal/data/*.pt
86+
torch/csrc/api/include/torch/version.h
87+
torch/csrc/cudnn/cuDNN.cpp
88+
torch/csrc/generated
89+
torch/csrc/generic/TensorMethods.cpp
90+
torch/csrc/jit/generated/*
91+
torch/csrc/jit/fuser/config.h
92+
torch/csrc/nn/THCUNN.cpp
93+
torch/csrc/nn/THCUNN.cwrap
94+
torch/bin/
95+
torch/cmake/
96+
torch/lib/*.a*
97+
torch/lib/*.dll*
98+
torch/lib/*.exe*
99+
torch/lib/*.dylib*
100+
torch/lib/*.h
101+
torch/lib/*.lib
102+
torch/lib/*.pdb
103+
torch/lib/*.so*
104+
torch/lib/protobuf*.pc
105+
torch/lib/build
106+
torch/lib/caffe2/
107+
torch/lib/cmake
108+
torch/lib/include
109+
torch/lib/pkgconfig
110+
torch/lib/protoc
111+
torch/lib/protobuf/
112+
torch/lib/tmp_install
113+
torch/lib/torch_shm_manager
114+
torch/lib/site-packages/
115+
torch/lib/python*
116+
torch/lib64
117+
torch/include/
118+
torch/share/
119+
torch/test/
120+
torch/utils/benchmark/utils/valgrind_wrapper/callgrind.h
121+
torch/utils/benchmark/utils/valgrind_wrapper/valgrind.h
122+
torch/version.py
123+
minifier_launcher.py
124+
# Root level file used in CI to specify certain env configs.
125+
# E.g., see .circleci/config.yaml
126+
env
127+
.circleci/scripts/COMMIT_MSG
128+
scripts/release_notes/*.json
129+
sccache-stats*.json
130+
131+
# These files get copied over on invoking setup.py
132+
torchgen/packaged/*
133+
!torchgen/packaged/README.md
134+
135+
# IPython notebook checkpoints
136+
.ipynb_checkpoints
137+
138+
# Editor temporaries
139+
*.swa
140+
*.swb
141+
*.swc
142+
*.swd
143+
*.swe
144+
*.swf
145+
*.swg
146+
*.swh
147+
*.swi
148+
*.swj
149+
*.swk
150+
*.swl
151+
*.swm
152+
*.swn
153+
*.swo
154+
*.swp
155+
*~
156+
.~lock.*
157+
158+
# macOS dir files
159+
.DS_Store
160+
161+
# Ninja files
162+
.ninja_deps
163+
.ninja_log
164+
compile_commands.json
165+
*.egg-info/
166+
docs/source/scripts/activation_images/
167+
docs/source/scripts/quantization_backend_configs/
168+
169+
## General
170+
171+
# Compiled Object files
172+
*.slo
173+
*.lo
174+
*.o
175+
*.cuo
176+
*.obj
177+
178+
# Compiled Dynamic libraries
179+
*.so
180+
*.dylib
181+
*.dll
182+
183+
# Compiled Static libraries
184+
*.lai
185+
*.la
186+
*.a
187+
*.lib
188+
189+
# Compiled protocol buffers
190+
*.pb.h
191+
*.pb.cc
192+
*_pb2.py
193+
194+
# Compiled python
195+
*.pyc
196+
*.pyd
197+
198+
# Compiled MATLAB
199+
*.mex*
200+
201+
# IPython notebook checkpoints
202+
.ipynb_checkpoints
203+
204+
# Editor temporaries
205+
*.swn
206+
*.swo
207+
*.swp
208+
*~
209+
210+
# NFS handle files
211+
**/.nfs*
212+
213+
# Sublime Text settings
214+
*.sublime-workspace
215+
*.sublime-project
216+
217+
# Eclipse Project settings
218+
*.*project
219+
.settings
220+
221+
# QtCreator files
222+
*.user
223+
224+
# PyCharm files
225+
.idea
226+
227+
# GDB history
228+
.gdb_history
229+
230+
## Caffe2
231+
232+
# build, distribute, and bins (+ python proto bindings)
233+
build/
234+
# Allow tools/build/ for build support.
235+
!tools/build/
236+
build_host_protoc
237+
build_android
238+
build_ios
239+
.build_debug/*
240+
.build_release/*
241+
.build_profile/*
242+
distribute/*
243+
*.testbin
244+
*.bin
245+
cmake_build
246+
.cmake_build
247+
gen
248+
.setuptools-cmake-build
249+
.pytest_cache
250+
aten/build/*
251+
252+
# Bram
253+
plsdontbreak
254+
255+
# Generated documentation
256+
docs/_site
257+
docs/gathered
258+
_site
259+
doxygen
260+
docs/dev
261+
262+
# LevelDB files
263+
*.sst
264+
*.ldb
265+
LOCK
266+
CURRENT
267+
MANIFEST-*
268+
269+
# generated version file
270+
caffe2/version.py
271+
272+
# setup.py intermediates
273+
.eggs
274+
caffe2.egg-info
275+
MANIFEST
276+
277+
# Atom/Watchman required file
278+
.watchmanconfig
279+
280+
# Files generated by CLion
281+
cmake-build-debug
282+
283+
# BEGIN NOT-CLEAN-FILES (setup.py handles this marker. Do not change.)
284+
#
285+
# Below files are not deleted by "setup.py clean".
286+
287+
# Downloaded bazel
288+
tools/bazel
289+
290+
# Visual Studio Code files
291+
.vs
292+
/.vscode/*
293+
!/.vscode/extensions.json
294+
!/.vscode/settings_recommended.json
295+
296+
# YouCompleteMe config file
297+
.ycm_extra_conf.py
298+
299+
# Files generated when a patch is rejected
300+
*.orig
301+
*.rej
302+
303+
# Files generated by ctags
304+
CTAGS
305+
GTAGS
306+
GRTAGS
307+
GSYMS
308+
GPATH
309+
tags
310+
TAGS
311+
312+
313+
# ccls file
314+
.ccls-cache/
315+
316+
# clang tooling storage location
317+
.clang-format-bin
318+
.clang-tidy-bin
319+
.lintbin
320+
321+
# clangd background index
322+
.clangd/
323+
.cache/
324+
325+
# bazel symlinks
326+
bazel-*
327+
328+
# xla repo
329+
xla/
330+
331+
# direnv, posh-direnv
332+
.env
333+
.envrc
334+
.psenvrc
335+
336+
# generated shellcheck directories
337+
.shellcheck_generated*/
338+
339+
# zip archives
340+
*.zip
341+
342+
# core dump files
343+
**/core.[1-9]*
344+
345+
# Generated if you use the pre-commit script for clang-tidy
346+
pr.diff
347+
348+
# coverage files
349+
*/**/.coverage.*
350+
351+
# buck generated files
352+
.buckd/
353+
.lsp-buck-out/
354+
.lsp.buckd/
355+
buck-out/
356+
357+
# Downloaded libraries
358+
third_party/ruy/
359+
third_party/glog/
360+
361+
# Virtualenv
362+
venv/
363+
364+
# Log files
365+
*.log
366+
sweep/

ao/quantization/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# Copyright (c) Meta Platforms, Inc. and affiliates.
2+
# All rights reserved.
3+
4+
# This source code is licensed under the license found in the
5+
# LICENSE file in the root directory of this source tree.
6+
17
from smoothquant import * # noqa: F403
28
from quant_api import * # noqa: F403
39
from subclass import * # noqa: F403
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-2.73 KB
Binary file not shown.
Binary file not shown.

ao/quantization/dynamic_quant.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# Copyright (c) Meta Platforms, Inc. and affiliates.
2+
# All rights reserved.
3+
4+
# This source code is licensed under the license found in the
5+
# LICENSE file in the root directory of this source tree.
6+
17
import torch
28
import torch.nn as nn
39
from quant_primitives import (

0 commit comments

Comments
 (0)