id
int64
2.74B
3.05B
title
stringlengths
1
255
user
stringlengths
2
26
state
stringclasses
2 values
labels
listlengths
0
24
comments
int64
0
206
author_association
stringclasses
4 values
body
stringlengths
7
62.5k
is_title
bool
1 class
2,745,818,362
[Inductor test failure] torch:inductor/test_select_algorithm TestSelectAlgorithm.test_convolution1 with cuda 12.6.3
qlzh727
open
[ "needs reproduction", "triaged", "oncall: pt2", "module: inductor" ]
22
CONTRIBUTOR
### 🐛 Describe the bug This is Qianli from Google. Our GPU team is testing the release of cuda 12.6.3 and noticed a test failure from inductor in our internal infra. I don't have a dev box setup to fully mirror this issue in a OSS env, but please see the error log and see if anything in the recent cuda change could c...
true
2,745,817,101
Support tensor subclass unwrapping (#141941)
tugsbayasgalan
closed
[ "fb-exported", "Stale", "module: inductor", "ciflow/inductor", "release notes: export" ]
3
CONTRIBUTOR
Summary: imported-using-ghimport Test Plan: Imported from OSS Reviewed By: bdhirsh Differential Revision: D66690419 Pulled By: tugsbayasgalan cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @...
true
2,745,766,046
Triton bump for 3.2 cherry-picks (device context)
bertmaher
closed
[ "Merged", "ciflow/trunk", "topic: not user facing", "ciflow/inductor" ]
3
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #143409 Summary: * https://github.com/triton-lang/triton/pull/3731
true
2,745,762,469
Parallelize epilogue/prologue benchmarking
eellison
closed
[ "Merged", "ciflow/trunk", "topic: not user facing", "module: inductor", "ciflow/inductor" ]
3
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * #145104 * #139102 * #145103 * __->__ #143408 When we attempt prologue or epilogue fusion with a TritonTemplate, we benchmark it at compile time in order to determine profitability. This avoids slowdowns/register spilling, and allows us to p...
true
2,745,749,847
Fix unused variables in test/test_transformers.py
rec
closed
[ "open source", "Merged", "ciflow/trunk", "topic: not user facing" ]
6
COLLABORATOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #143407
true
2,745,745,033
torch.compile - Simplify error when triton package is not found
atalman
closed
[ "triaged", "oncall: pt2", "module: inductor" ]
4
CONTRIBUTOR
### 🐛 Describe the bug Initial title: titon: python 3.13 torch.compile smoke test is failing in CI/CD I observe following failure running smoke_test for python 3.13, cuda 11.8, cuda 12.4, cuda 12.6: https://github.com/pytorch/pytorch/blob/main/.ci/pytorch/smoke_test/smoke_test.py Detected during validation...
true
2,745,736,903
[compiled autograd] Always proxy autograd.Function nodes; handle AOT backwards
zou3519
closed
[ "Merged", "Reverted", "topic: not user facing", "module: inductor", "module: dynamo", "ciflow/inductor", "module: compiled autograd", "ci-no-td" ]
2
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * #144115 * #143417 * __->__ #143405 * #143387 * #143304 * #143296 We will always proxy autograd.Function nodes in compiled autograd's initial graph capture (previously there was an option to proxy vs trace into the autograd.Function) We have...
true
2,745,728,947
[dynamo, 3.13t] raise error if torch.compile is attempted in 3.13t (nogil)
williamwen42
closed
[ "Merged", "ciflow/trunk", "module: dynamo", "ciflow/inductor", "release notes: dynamo", "module: python version" ]
7
MEMBER
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #143404 cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames
true
2,745,706,715
Add warning to torch.jit.load
mikaylagawarecki
closed
[ "oncall: jit", "Merged", "ciflow/trunk", "release notes: jit", "topic: docs" ]
3
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #143403 * #143326 cc @EikanWang @jgong5 @wenzhe-nrv @sanchitintel
true
2,745,696,819
(MTIA) Move "empty_cache" API
chaos5958
closed
[ "fb-exported", "Merged", "Reverted", "Stale", "ciflow/trunk", "topic: not user facing", "ci-no-td" ]
13
CONTRIBUTOR
Summary: This diff moves one of memory-related APIs to the consolidated location, which is `mtia/memory.py`. Test Plan: ``` buck2 test //mtia/host_runtime/torch_mtia/tests:test_torch_mtia_api ``` https://www.internalfb.com/intern/testinfra/testrun/13510798943184259 Reviewed By: nautsimon Differential Revision: D671...
true
2,745,662,972
fix a few int64_t index computations, fix complex128 scan that had to…
ngimel
closed
[ "Merged", "ciflow/trunk", "release notes: cuda" ]
3
COLLABORATOR
…o few threads per title cc @eqy
true
2,745,643,754
Remove Android folder
msaroufim
closed
[ "ciflow/trunk", "topic: deprecation", "topic: not user facing", "skip-pr-sanity-checks", "suppress-bc-linter" ]
10
MEMBER
This folder is a tutorial that is not packaged in PyTorch that's an example of how to use the now deprecated Lite Interpreter for Android People should be using Executorch instead and there's already good documentation on it all over our tutorials and main homepage Testing to see what breaks in CI 1. Removed thi...
true
2,745,640,480
Fix unused variables in test/torch.py
rec
closed
[ "open source", "Merged", "ciflow/trunk", "topic: not user facing" ]
3
COLLABORATOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #143399
true
2,745,625,457
Remove iOS folder
msaroufim
closed
[ "Merged", "ciflow/trunk", "topic: deprecation", "topic: not user facing", "skip-pr-sanity-checks", "suppress-bc-linter" ]
8
MEMBER
This folder is a tutorial that is not packaged in PyTorch that's an example of how to use the now deprecated Lite Interpreter People should be using Executorch instead and there's already good documentation on it all over our tutorials and main homepage Testing to see what breaks in CI cc @albanD
true
2,745,614,545
Enable torch.compile check on nightly validaitons
atalman
closed
[ "ciflow/binaries", "topic: not user facing" ]
2
CONTRIBUTOR
I am seeing an error with torch.compile python 3.13. Please see https://github.com/pytorch/test-infra/issues/6077#issue-2745142173 Error: ``` esting smoke_test_compile for cuda and torch.float16 Traceback (most recent call last): File "/pytorch/pytorch/.ci/pytorch/./smoke_test/smoke_test.py", line 385, in <mo...
true
2,745,569,577
Fix unused Python variables in test/nn
rec
closed
[ "open source", "Merged", "ciflow/trunk", "topic: not user facing" ]
9
COLLABORATOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #143396
true
2,745,568,912
[BE] Refactor argument parsing into its own function
malfet
closed
[ "Merged", "topic: not user facing" ]
3
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * #143513 * #143512 * #143511 * __->__ #143395
true
2,745,568,705
[CD] Test that all PyTorch wheels support OpenMP
malfet
closed
[ "Merged", "topic: not user facing", "ciflow/binaries_wheel" ]
3
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * #143395 * __->__ #143394 * #143393 Together with https://github.com/pytorch/pytorch/pull/143393 fixes https://github.com/pytorch/pytorch/issues/123225
true
2,745,568,243
[CD] Run smoke tests on MacOS wheel
malfet
closed
[ "Merged", "release notes: releng", "topic: improvements", "ciflow/binaries_wheel" ]
3
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * #143395 * #143394 * __->__ #143393 cc @seemethere
true
2,745,555,115
Prevent users from seeing hardcoded print stmt when hypothesis is not installed
pytorchbot
closed
[ "open source", "module: dynamo", "ciflow/inductor" ]
3
COLLABORATOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #142398 Fixes: #142357 cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames
true
2,745,521,423
add some logging for tensorify
bobrenjc93
closed
[ "Merged", "ciflow/trunk", "release notes: fx", "topic: not user facing", "fx", "module: dynamo", "ciflow/inductor" ]
8
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #143391 cc @ezyang @SherlockNoMad @EikanWang @jgong5 @wenzhe-nrv @voznesenskym @penguinwu @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @jiayisunx @chenyang78 @kadeng @chauhang @amjames
true
2,745,378,532
[AOTI][doc] Update tutorial
desertfire
closed
[ "Merged", "topic: docs", "release notes: inductor" ]
3
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #143390 Summary: Update the cpp inference part to call AOTIModelPackageLoader.run directly
true
2,745,316,176
Fix unused variables in test_serialize_sym_float
rec
closed
[ "open source", "Merged", "ciflow/trunk", "topic: not user facing" ]
3
COLLABORATOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #143389
true
2,745,306,250
TEST Windows build
atalman
closed
[ "Stale", "topic: not user facing", "ciflow/binaries_wheel" ]
2
CONTRIBUTOR
Fixes #ISSUE_NUMBER
true
2,745,300,626
[compiled autograd] Proxy nodes for user-defined C++ torch::autograd::Function
zou3519
closed
[ "oncall: jit", "Merged", "Reverted", "topic: not user facing", "module: inductor", "module: dynamo", "ciflow/inductor", "keep-going", "module: compiled autograd", "ci-no-td" ]
2
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * #144115 * #143417 * #143405 * __->__ #143387 * #143304 * #143296 We define a functional version of a C++ torch::autograd::Function. The functional version reconstructs the ctx object and then calls backward with it. Some more details: - we ...
true
2,745,231,538
[draft] PP with compile test
H-Huang
open
[ "oncall: distributed", "Stale", "topic: not user facing" ]
4
MEMBER
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #143386 * #143599 testing command: `python test/distributed/_composable/test_composability/test_pp_composability.py -k test_pp_with_compile` cc @awgu @kwen2501 @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @c-p-i-o
true
2,744,962,913
Fix PythonMod printing for C++
isuruf
closed
[ "module: cpu", "open source", "Merged", "module: inductor", "module: dynamo", "ciflow/inductor", "release notes: dynamo" ]
1
COLLABORATOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * #140756 * #139899 * #143164 * __->__ #143385 cc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @voznesenskym @penguinwu @EikanWang @Guobing-Chen @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kad...
true
2,744,480,939
[CPU][Brgemm] add support for int8 brgemm
Valentine233
closed
[ "module: cpu", "triaged", "open source", "Merged", "ciflow/trunk", "topic: not user facing", "module: inductor", "ciflow/inductor" ]
17
COLLABORATOR
For INT8 SDPA kernel usage, we add support for INT8 Brgemm. cc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @voznesenskym @penguinwu @EikanWang @Guobing-Chen @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire @chauhang @...
true
2,744,337,982
[codemod] Decorate unused variables with `[[maybe_unused]]`
r-barnes
closed
[ "fb-exported", "Merged", "ciflow/trunk", "topic: not user facing" ]
12
CONTRIBUTOR
Summary: LLVM-15 has a warning `-Wunused-variable` which we treat as an error because it's so often diagnostic of a code issue. Unused variables can compromise readability or, worse, performance. This diff either (a) removes an unused variable and, possibly, it's associated code or (b) qualifies the variable with `...
true
2,744,289,973
Add 2 more APIs to the exposed public torch python APIs
manav-a
closed
[ "Merged", "ciflow/trunk", "topic: not user facing" ]
8
CONTRIBUTOR
These two APIs are being used internally for some projects and need to be exposed as the build for this is done using OSS toolchain. https://github.com/pytorch/pytorch/commit/af8789c05654477649e4d99e6a253a2ebd81ad9e - this change hid most apis in torch python barring the ones explicitly specified breaking the build.
true
2,744,267,089
Running decompositions over torch.export program adds one more output to the graph result
vivekkhandelwal1
open
[ "oncall: pt2", "oncall: export" ]
1
CONTRIBUTOR
### 🐛 Describe the bug On running the decomposition over the exported program through the torch.export it manipulates the graph such that the no. of results returned by the manipulated graph are 1 more than the original graph. Below is the code to repro the issue: ``` import torch from torch.export import export ...
true
2,744,205,050
[export][dynamic shapes] log provenance for locals & symbols for non-strict
pianpwk
closed
[ "Merged", "ciflow/trunk", "fx", "ciflow/inductor", "release notes: export" ]
14
CONTRIBUTOR
Adds `dtrace_structured` logging so when a guard or real-tensor propagation assert is added, the relevant user code with local symbolic values & free symbols are logged, e.g. from the draft export CLI report (soon to be added to tlparse): 1. Guard added: ``` 1. Constraint violation error. The specified input dy...
true
2,744,090,915
Circular import in torch._dynamo.trace_rules
bzamecnik
closed
[]
1
NONE
### 🐛 Describe the bug When trying to import `torch._dynamo.trace_rules` (e.g. via `import lightning`) the code crashes on circular import. How to reproduce: ``` import torch._dynamo.trace_rules ``` Traceback: ``` --------------------------------------------------------------------------- ImportError ...
true
2,744,062,599
Remove assert from partitioner.py
digantdesai
closed
[ "Merged", "ciflow/trunk", "release notes: fx", "fx" ]
6
CONTRIBUTOR
Remove erroneous assert assuming a dependent (user) node to be in the partition. This partially reverts #136616 by removing the assert. Tested locally with a failing ExecuTorch Arm test using ``` $ python -m examples.arm.aot_arm_compiler --model_name mv2 --target ethos-u55-128 --delegate --quantize ``` cc @ezy...
true
2,744,052,897
[MPS] Use metal shaders for all view ops
malfet
closed
[ "Merged", "topic: bug fixes", "release notes: mps", "ciflow/mps" ]
7
CONTRIBUTOR
Before this PR Metal shaders were used to scatter/gather 1-5 dimensional tensors. This PR introduces generalized ones that could be used for any dimensionality and as results gets rid of 700+ lines complex and untested code that might not even work as expected. Generalized gather shader looks as follows ```metal ...
true
2,744,035,848
[Dynamo] Add DictKeySetVariable to capture dict_keys passed outside of compiled region
yanboliang
closed
[ "Merged", "ciflow/trunk", "topic: not user facing", "module: dynamo", "ciflow/inductor" ]
6
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * #143557 * #143547 * __->__ #143374 cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames
true
2,744,034,045
DISABLED test_disable_external_correlation (__main__.TestProfiler)
huydhn
open
[ "module: rocm", "triaged", "skipped" ]
1
CONTRIBUTOR
Platforms: rocm This test was disabled because it is failing on main branch ([recent examples](https://torch-ci.com/failure?failureCaptures=%5B%22profiler%2Ftest_profiler.py%3A%3ATestProfiler%3A%3Atest_disable_external_correlation%22%5D)). The test is failing on ROCm https://github.com/pytorch/pytorch/pull/143314...
true
2,744,022,584
Error in DTensor uneven shard view op
guo-ran
closed
[ "oncall: distributed", "module: dtensor" ]
10
NONE
### 🐛 Describe the bug **Description**: There seems to be an issue when reshaping/viewing an unevenly sharded DTensor. **Code to Reproduce:** torchrun --nproc_per_node=4 test.py In this test case has 512 elements on ranks 0-2 and 0 elements on rank 3. The error occurs during the view operation. ``` import ...
true
2,743,884,050
clean up type nits on torch/jit/_ir_utils.py
bobrenjc93
closed
[ "oncall: jit", "Merged", "ciflow/trunk", "release notes: jit", "topic: not user facing" ]
4
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #143371 cc @EikanWang @jgong5 @wenzhe-nrv @sanchitintel
true
2,743,873,847
remove allow-untyped-defs for torch/_C/_lazy.pyi
bobrenjc93
closed
[ "Merged", "ciflow/trunk", "topic: not user facing" ]
10
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #143370
true
2,743,873,785
remove allow-untyped-defs for torch/_C/_distributed_autograd.pyi
bobrenjc93
closed
[ "Merged", "ciflow/trunk", "topic: not user facing" ]
6
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #143369
true
2,743,873,721
remove allow-untyped-defs for torch/utils/benchmark/examples/simple_timeit.py
bobrenjc93
closed
[ "Merged", "ciflow/trunk", "topic: not user facing" ]
12
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #143368
true
2,743,873,667
remove allow-untyped-defs for torch/_lazy/device_context.py
bobrenjc93
closed
[ "Merged", "ciflow/trunk", "topic: not user facing" ]
12
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #143367
true
2,743,873,611
remove allow-untyped-defs for torch/jit/_ir_utils.py
bobrenjc93
closed
[ "oncall: jit", "Merged", "ciflow/trunk", "release notes: jit", "topic: not user facing" ]
6
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * #143371 * #143370 * #143369 * #143368 * #143367 * __->__ #143366 cc @EikanWang @jgong5 @wenzhe-nrv @sanchitintel
true
2,743,859,610
Don't 1 specialize if stride is contiguous
bobrenjc93
closed
[ "Merged", "ciflow/trunk", "release notes: fx", "topic: not user facing", "fx", "module: dynamo", "ciflow/inductor" ]
7
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #143365 Fixes: https://github.com/pytorch/pytorch/issues/142024 cc @ezyang @SherlockNoMad @EikanWang @jgong5 @wenzhe-nrv @voznesenskym @penguinwu @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @jiayisunx @chenyang78 @kadeng @cha...
true
2,743,848,800
Support garbage collection after pt2 compilation
qiurc
closed
[ "Merged", "ciflow/trunk", "topic: not user facing", "module: dynamo", "ciflow/inductor" ]
10
CONTRIBUTOR
Summary: Support garbage collection after pt2 compilation. Add jk to control the global rollout / rollback of this functionality Add env var to control individual job's rollout Test Plan: Test the model training job with / without this changes Reviewers: @yuxihu @ezyang , @Yuzhen11 , Subscribers: T...
true
2,743,827,913
[Inductor] Register pattern match with dropout in torchao as a customized pass
Valentine233
closed
[ "triaged", "oncall: pt2", "module: inductor" ]
1
COLLABORATOR
### Description In https://github.com/pytorch/ao/pull/1372, we try to add a pattern match pass for int8 SDPA in torchao. For the pass in pytorch, the order is `joint_custom_pre -> remove_noop_ops -> constant_folding -> pattern_matcher -> fallback_random -> joint_custom_post`. As we know, the clone() from dropout wou...
true
2,743,792,299
[ROS Jazzy + WSL2] No module named 'torch' when launching a ROS node with virtualenv
nora-4853
open
[ "module: windows", "triaged", "module: wsl" ]
0
NONE
Hello, I am currently working on a ROS Jazzy project inside WSL2 (Ubuntu). I am using a Python virtual environment to install libraries like torch. However, when I launch my node using roslaunch, I encounter this error: [ERROR] [launch]: Caught exception in launch (see debug for traceback): No module named 'torch' ...
true
2,743,776,764
tools: Add a tool to build wheels for multiple python versions
seemethere
closed
[ "Merged", "ciflow/trunk", "topic: not user facing" ]
6
MEMBER
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #143361 Adds a tool to build bdist_wheels sequentially for multiple different python versions (if specified). The goal of this tool is to eventually be able to utilize this in our binary build runs to significantly reduce the am...
true
2,743,738,633
[dcp] Add ZStandard transformer
mhorowitz
closed
[ "oncall: distributed", "Merged", "Reverted", "ciflow/binaries", "ciflow/trunk", "release notes: distributed (checkpoint)", "ci-no-td" ]
18
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #143360 * #145528 cc @H-Huang @awgu @kwen2501 @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @c-p-i-o @LucasLLC @MeetVadakkanchery @pradeepfn @ekr0
true
2,743,738,567
[dcp] Integrate stream extensions into DCP impl
mhorowitz
closed
[ "oncall: distributed", "Merged", "release notes: distributed (checkpoint)" ]
2
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * #143360 * __->__ #143359 * #143358 Summary: Updates FileSystemReader/Writer, Planner, DefaultLoad/SavePlanner cc @H-Huang @awgu @kwen2501 @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @c-p-i-o @LucasLLC @MeetVadakkanchery @pradeepfn @ekr...
true
2,743,738,499
[dcp] Add extension mechanism
mhorowitz
closed
[ "oncall: distributed", "Merged", "release notes: distributed (checkpoint)" ]
3
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * #143360 * #143359 * __->__ #143358 cc @H-Huang @awgu @kwen2501 @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @c-p-i-o @LucasLLC @MeetVadakkanchery @pradeepfn @ekr0
true
2,743,738,418
[distributed] Fix _ReaderView.read() and readinto() to stop reading at the end of the slice
mhorowitz
closed
[ "oncall: distributed", "Merged", "ciflow/trunk", "topic: not user facing" ]
6
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * #143360 * #143359 * #143358 * __->__ #143357 _ReaderView doesn't work correctly if the slice ends past the view. read(-1) would call read(-1) on the base_stream, which would consume the entire underlying stream, even if the view ended be...
true
2,743,735,315
Back out "Fix undesired specialization on slice after split. (#142372)"
laithsakka
closed
[ "fb-exported", "Merged", "ciflow/trunk", "topic: not user facing", "module: inductor", "ciflow/inductor" ]
23
CONTRIBUTOR
Summary: Original commit changeset: e54ffcc9fd48 Original Phabricator Diff: D67113058 Reviewed By: ezyang Differential Revision: D67311579 cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPep...
true
2,743,733,759
Enable more C++ warnings
cyyever
closed
[ "oncall: distributed", "oncall: jit", "module: cpu", "triaged", "open source", "Merged", "Reverted", "ciflow/trunk", "release notes: quantization", "release notes: distributed (c10d)", "ci-no-td", "ciflow/s390" ]
17
COLLABORATOR
Fixes #ISSUE_NUMBER cc @H-Huang @awgu @kwen2501 @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @c-p-i-o @EikanWang @jgong5 @wenzhe-nrv @sanchitintel @mingfeima @XiaobingSuper @ashokei @jingxu10
true
2,743,724,854
[fr] recognize all_reduce_barrier as a valid op
c-p-i-o
closed
[ "oncall: distributed", "fb-exported", "Merged", "ciflow/trunk", "topic: not user facing" ]
6
CONTRIBUTOR
Summary: D67068632 introduced a better profiling name for barrier operations to be able to distinguish various ops. Unfortunately, this broke Flight Recorder Analysis with the following error as reported by dmwu ``` fr_trace -m torchx-param_bench_16g_mi300x-all_to_all -a 0 --mast_job_version 98 -w 16 Traceback (most r...
true
2,743,717,888
[user triton cache] Dedup user-defined Triton kernels by config in codecache
aakhundov
closed
[ "Merged", "ciflow/trunk", "topic: not user facing", "module: inductor", "ciflow/inductor" ]
3
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #143353 Previously, the same kernel source with different autotuning configs would generate the same cache key which can lead to wrong cache it and silent incorrectness. Here we add the configs to the cache key in `FxGraphHashDetails`...
true
2,743,716,583
[AOTI] Emit a CMakeLists.txt when package_cpp_only
desertfire
closed
[ "Merged", "Reverted", "ciflow/trunk", "topic: new features", "module: inductor", "ciflow/inductor", "release notes: inductor", "ciflow/rocm", "ci-no-td" ]
9
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #143352 Summary: Emit a CMakeLists.txt with compile and link options when package_cpp_only is specified. After unzipping AOTI generated .pt2 package file, user can manually build the generated model code in their local environment. c...
true
2,743,716,538
[AOTI] Fix a typo in cpp_builder.py
desertfire
closed
[ "Merged", "ciflow/trunk", "topic: not user facing", "module: inductor", "ciflow/inductor" ]
3
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * #143352 * __->__ #143351 * #143350 Summary: passthough -> passthrough cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @Coli...
true
2,743,716,488
[AOTI] Refactor path operations in AotCodeCompiler
desertfire
closed
[ "Merged", "topic: not user facing", "module: inductor", "ciflow/inductor" ]
1
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * #143352 * #143351 * __->__ #143350 Summary: Use safer pathlib operation instead of direct string manipulation; Update some path naming to make them more meaningful. cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSu...
true
2,743,716,171
Implement additional properties [ mean, stddev, variance] for TransformedDistribution
AlboAlby00
closed
[ "module: distributions", "open source", "Stale", "topic: not user facing" ]
5
NONE
Fixes #142825 I plan to implement the mean, stddev and variance for the TransformedDistribution that currently raise a NotImplementedError. The idea would be adding a method "mean" to as many transformations as possible. ```python def mean(self, base_distribution): """ Returns the mean of the t...
true
2,743,713,465
[ROCm] Get rid of extra rpath-link that was needed for libtinfo.
naromero77amd
closed
[ "module: rocm", "open source", "Merged", "ciflow/trunk", "topic: not user facing", "ciflow/rocm" ]
6
COLLABORATOR
Fixes #137858 Due to the extra rpath-link line inserted by these CMake lines, it is possible to unintentionally pick up other libraries that are incompatible with the version of ROCm in ${ROCM_PATH}. cc @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @dllehr-amd @jataylo @hongxiayang
true
2,743,712,100
[MTIA] (3/n) Implement PyTorch APIs to query/reset device peak memory usage
chaos5958
closed
[ "fb-exported", "Merged", "Reverted", "Stale", "ciflow/trunk", "topic: not user facing", "ci-no-td" ]
31
CONTRIBUTOR
Summary: This diff implements the "max_memory_allocated" PyTorch API for MTIA devices, which returns the peak device DRAM usage Test Plan: Passed the local unit test ``` buck2 test //mtia/host_runtime/torch_mtia/tests:test_torch_mtia_api -- -r test_max_memory_allocated ``` https://www.internalfb.com/intern/testinfra/...
true
2,743,709,653
CUDA OOM error when inferencing with SwinTransformer ExportedProgram
rbavery
closed
[ "oncall: pt2" ]
1
NONE
### 🐛 Describe the bug I have a SWIN Transformer model that I was successfully exporting and inferencing with torch 2.3.0 using `torch._export.aot_compile` but that is now failing to inference with torch 2.5.1. With torch `2.3.0` and the `aot_compile` method I was able to inference with a batch size of 10. When I ...
true
2,743,706,749
Create build_directory if it does not exist when generating ninja build file
pytorchbot
closed
[ "open source" ]
1
COLLABORATOR
Fixes: https://github.com/pytorch/vision/issues/8816 I am observing this failure on Windows, Python 3.13 vision builds: ``` Emitting ninja build file C:\actions-runner\_work\vision\vision\pytorch\vision\build\temp.win-amd64-cpython-313\Release\build.ninja... error: [Errno 2] No such file or directory: 'C:\\actions-...
true
2,743,657,859
[FlexAttention] Fix broken eager tracing
drisspg
closed
[ "Merged", "ciflow/trunk", "topic: not user facing", "bug", "module: inductor", "module: dynamo", "ciflow/inductor", "ciflow/rocm", "module: flex attention" ]
4
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * #143103 * __->__ #143344 * #143299 Fixes #143331 cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @am...
true
2,743,626,220
Add float8 support in serde schema
yushangdi
closed
[ "fb-exported", "Merged", "ciflow/trunk", "ciflow/inductor", "release notes: export" ]
10
CONTRIBUTOR
Summary: Fix https://github.com/pytorch/pytorch/issues/141316 Bump up schema minor version. as title, add float8 support in serde schema Test Plan: ``` buck2 run 'fbcode//mode/dev-nosan' fbcode//caffe2/test:test_export -- -r test_serialize_float8 ``` Differential Revision: D67307670
true
2,743,625,479
Add config.save.use_pinned_memory_for_d2h to serialization config
mikaylagawarecki
closed
[ "Merged", "ciflow/trunk", "release notes: python_frontend", "topic: new features" ]
8
CONTRIBUTOR
This was benchmarked with two separate scripts on my A100 (A) Save state_dict of llama3-style model on CUDA to disk with ``torch.save`` (B) Save `ModuleList` of 10 `nn.Linear(10,000, 10,000)` on CUDA to disk with `torch.save` Timings are an average of 5 runs and benchmark scripts + results are attached Under both...
true
2,743,623,072
[RFC] Introduce cache hot loading APIs (a.k.a. "Mega-cache")
oulgen
closed
[ "Merged", "ciflow/trunk", "module: inductor", "module: dynamo", "ciflow/inductor", "release notes: inductor" ]
7
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #143341 This PR essentially introduces two new APIs * torch.compiler.save_cache_artifacts * torch.compiler.load_cache_artifacts which aim to create a mega cache experience where the user can start collecting cache artifacts, and...
true
2,743,622,766
[dynamo, eval frame] manually manage ExtraState memory
williamwen42
closed
[ "topic: not user facing", "module: dynamo", "ciflow/inductor" ]
5
MEMBER
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #143340 Fixes https://github.com/pytorch/pytorch/issues/140998 cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames
true
2,743,595,553
[AOTI] Add is_big_gpu checking to test_conv3d
desertfire
closed
[ "fb-exported", "Merged", "ciflow/trunk", "topic: not user facing", "module: inductor", "ciflow/inductor" ]
4
CONTRIBUTOR
Summary: test_conv3d tests max-autotune, which is only supported for big_gpu. Differential Revision: D67306331 cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @chauhang @aakhu...
true
2,743,593,120
c10::SmallVector unusable with gcc/g++ 12 and 13 with `-O3`
hugary1995
open
[ "needs reproduction", "module: build", "module: cpp", "triaged" ]
3
NONE
### 🐛 Describe the bug Recently, github hosted runners for `ubuntu-latest` is migrating from ubuntu 22.04 to ubuntu 24.04. As part of that migration, the default compiler has changed from gcc 11.4 to gcc 13.2. A lot of my CI workflows using libtorch are failing during this migration. All errors look like the fol...
true
2,743,590,742
An idea to improve Welford implementation in Inductor
shunting314
open
[ "triaged", "oncall: pt2" ]
7
CONTRIBUTOR
### 🐛 Describe the bug Inductor implements a one-pass Welford algorithm to compute variance. The basic idea is to maintain 3 metrics (weight, mean, m2) for each group of items, and implement a combine function to merge these metrics for two group of items. - Weight represents the number of elements in the group ...
true
2,743,585,809
Add more detail description on error for arguments
nluu175
closed
[ "triaged", "open source", "Stale", "module: dynamo" ]
6
CONTRIBUTOR
Fixes #122129 - Added a more detail description for argument type checking error. cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames
true
2,743,575,336
xpu: implement communication collectives for XPU backend
dvrogozh
closed
[ "oncall: distributed", "open source", "Stale", "release notes: xpu" ]
4
CONTRIBUTOR
A draft with communication collectives APIs implementation for XPU backend. TODO: - [ ] Consider where APIs should be exposed (`torch.cuda.comm` & `torch.xpu.comm` vs. `torch.nn.parallel.comm` & deprecation of `torch.cuda.comm`) - [ ] Add tests based on: https://github.com/pytorch/pytorch/blob/6356690b3d283c65d5f990a...
true
2,743,520,326
Applying python 'next' directly on a tensor is painfully slow
gailweiss
open
[ "triaged", "enhancement", "module: python frontend" ]
4
NONE
### 🐛 Describe the bug Applying the standard python `next` function directly to a pytorch tensor is mysteriously (and painfully) slow relative to iterating over the indices of that tensor and accessing each value independently. This is not due to, at least explicitly, breaking `next`: when printing the values being...
true
2,743,512,366
NJT linear_backward should not return inner tensor as-is
soulitzer
closed
[ "Merged", "topic: not user facing" ]
2
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * #143415 * __->__ #143333 Fixes debug=1 use-count checks https://github.com/pytorch/pytorch/actions/runs/12187808902/job/34002323481#step:22:2521
true
2,743,506,849
[logging] A few fixes/updates to record_compilation_metrics
masnesral
closed
[ "Merged", "Reverted", "ciflow/trunk", "topic: not user facing", "module: dynamo", "ciflow/inductor", "ci-no-td" ]
12
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #143332 Summary: Mostly cosmetic, but one bug fix: * Bug fix: Make sure compile_id is converted to a string in the compilation metrics so it's printed as, e.g., "0/1" instead of "[0, 1]" * Sort collections in `collection_to_str` *...
true
2,743,504,401
FlexAttention: compilation produces wrong shapes on nightly
ViktorooReps
closed
[ "triaged", "oncall: pt2", "module: higher order operators", "module: pt2-dispatcher", "module: flex attention" ]
9
NONE
### 🐛 Describe the bug I am implementing a Differential Transformer with FlexAttention. It requires specific Q/K/V head sizes since each Q and K heads are split in half for each attention call. So in practice our Q/K has 1/2 of the original head dimensionality, while V stays the same. Here is how it looks more o...
true
2,743,504,112
[AoTI Minifier] UX Improvement
yushangdi
closed
[ "fb-exported", "Merged", "ciflow/trunk", "topic: not user facing", "module: inductor", "module: dynamo", "ciflow/inductor" ]
13
CONTRIBUTOR
Summary: - When a user specify `TORCHINDUCTOR_MAX_AUTOTUNE=1` env variable, we add `config.max_autotune=True` to the generated minifier_launcher - We should do this to other inductor configs as well in a followup Diff Currently in dynamo and aoti minifier, if a config is overwritten by an env variable, the config will...
true
2,743,497,145
[ROCm][Windows] Disable roctracer-related code
m-gallus
closed
[ "module: rocm", "triaged", "open source", "Merged", "ciflow/trunk", "topic: not user facing" ]
15
CONTRIBUTOR
Currently, the roctracer for Windows is not available. This PR disables any mentions of its usage for Windows, and creates dummy functions for Windows to keep compatibility with existing code, but which warn the user about the lack of Windows' availability. cc @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROC...
true
2,743,488,161
Create build_directory if it does not exist when generating ninja build file
atalman
closed
[ "Merged", "topic: not user facing" ]
5
CONTRIBUTOR
Fixes: https://github.com/pytorch/vision/issues/8816 I am observing this failure on Windows, Python 3.13 vision builds: ``` Emitting ninja build file C:\actions-runner\_work\vision\vision\pytorch\vision\build\temp.win-amd64-cpython-313\Release\build.ninja... error: [Errno 2] No such file or directory: 'C:\\actions-...
true
2,743,471,868
Increase sharding for debug build
clee2000
closed
[ "Merged", "topic: not user facing", "ciflow/periodic", "test-config/default" ]
3
CONTRIBUTOR
It started timing out consistently and takes 3+ hours per shard I assume its just that we slowly increase tests over time since I cannot find a dramatic jump recently
true
2,743,469,023
Prevent torch.jit.load path in torch.load when weights_only=True
mikaylagawarecki
closed
[ "Merged", "ciflow/trunk", "release notes: python_frontend", "topic: security" ]
5
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * #143403 * __->__ #143326
true
2,743,442,481
Add global config for serialization in torch.utils.serialization
mikaylagawarecki
closed
[]
1
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #143325 * #143324
true
2,743,442,359
Refactor serialization getter/setters into torch.utils.serialization.config
mikaylagawarecki
closed
[ "Merged", "release notes: python_frontend", "topic: improvements" ]
1
CONTRIBUTOR
Consolidate - get/set_default_load_endianness - get/set_default_mmap_options - get/set_crc32_options into one global dynamo-style config + allow global setting of mmap. The existing APIs are not removed and will get/set from the config (as they can't be removed for BC) In #143459 I add the local (argument sty...
true
2,743,442,250
Various fix for memory leak in test autograd and dataloader
albanD
closed
[ "Merged", "ciflow/trunk", "topic: not user facing" ]
4
COLLABORATOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * #143204 * __->__ #143323 * #143225
true
2,743,412,641
[ROCm] Fix unit test: matmul_offline_tunableop
naromero77amd
closed
[ "module: rocm", "triaged", "open source", "Merged", "ciflow/trunk", "topic: not user facing", "ciflow/rocm" ]
4
COLLABORATOR
Fixes #137936 The PR contains: * Fix for `matmul_offline_tunableop` * Clean-up try-finally blocks in UTs that don't use environment variables (`test_validator_tunableop_rocm`, `test_minimum_tuning_iteration_tunableop`, `test_disable_tuning_tunableop`) * Avoid the use of environment variables in `minimum_tuning_it...
true
2,743,410,828
remove allow-untyped-defs for torch/masked/maskedtensor/creation.py
bobrenjc93
closed
[ "Merged", "ciflow/trunk", "topic: not user facing" ]
3
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #143321
true
2,743,410,736
remove allow-untyped-defs for torch/__config__.py
bobrenjc93
closed
[ "Merged", "ciflow/trunk", "topic: not user facing" ]
3
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * #143321 * __->__ #143320 * #143319
true
2,743,410,640
remove allow-untyped-defs for torch/utils/_stats.py
bobrenjc93
closed
[ "Merged", "ciflow/trunk", "topic: not user facing" ]
3
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #143319
true
2,743,402,111
FileTimerClient: add retry logic on connect
d4l3k
closed
[ "oncall: distributed", "Merged", "Reverted", "ciflow/trunk", "release notes: distributed (torchelastic)", "ci-no-td" ]
8
MEMBER
Fixes #143188 The fifo server binds from a thread -- under rare cases the client connects before the server thread starts. This adds a retry when opening the fifo socket in non-blocking mode. This will wait up to 1s for the server to start which balances fast error messages while still providing some wiggle room on ...
true
2,743,343,662
easy: dynamo_config: sort keys and set values
c00w
closed
[ "Merged", "ciflow/trunk", "topic: not user facing", "module: dynamo", "ciflow/inductor" ]
3
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #143317 * #143307 This will create consistent ordering of keys when writing, as well as sorting sets before serializing cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiay...
true
2,743,339,496
Enable swap on all Linux jobs
huydhn
closed
[ "Merged", "topic: not user facing", "test-config/default", "no-runner-experiments" ]
3
CONTRIBUTOR
A swapfile on Linux runner has been prepared by https://github.com/pytorch/test-infra/pull/6058. So this PR does 2 things: * Start using the swapfile on all Linux build and test jobs * Testing the rollout https://github.com/pytorch-labs/pytorch-gha-infra/pull/582 ### Testing Run `swapon` inside the container...
true
2,743,294,058
remove nonowninglayout special case in require strides
eellison
closed
[ "Merged", "ciflow/trunk", "topic: not user facing", "module: inductor", "ciflow/inductor" ]
6
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * #141905 * __->__ #143315 NonOwningLayout is always constructed to a FixedLayout. We should handle it the same way as FixedLayout. Note - this case is very rare, I added an assertion here and no test/model failed. cc @voznesenskym @peng...
true
2,743,273,752
[Profiler] Add Optional Flag to turn off external correlations v2
sraikund16
closed
[ "enhancement", "fb-exported", "Merged", "ciflow/trunk", "release notes: profiler", "topic: improvements", "ciflow/rocm" ]
5
CONTRIBUTOR
Summary: The original diff got reverted because its base commit was on a broken version of pytorch that was failing rocm tests. There is no indication that this diff had any effect on rocm. Had trouble rebasing the GH pr after revert and accidentally closed the PR so submitting again . Test Plan: See original PR wit...
true
2,743,268,403
[EXPERIMENTAL][dynamo] Turn on `inline_inbuilt_nn_modules` for fbcode
StrongerXi
closed
[ "Stale", "ciflow/trunk", "topic: not user facing", "module: dynamo", "ciflow/inductor" ]
3
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * #145117 * __->__ #143313 cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames Differential Revision: [D67295821](https://our.internmc...
true
2,743,253,459
[dynamo] Add a lint rule to restrict what 3P library one can import
StrongerXi
closed
[ "Merged", "ciflow/trunk", "topic: not user facing" ]
4
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #143312 As title, this patch prevents developers from importing third party libraries to patch things in Dynamo, unless there's no other easy workaround (in which case one would add the library to the allowlist in `import_linter.py`, ...
true
2,743,188,275
Script to generate NJT OpInfo testing report
jbschlosser
open
[ "Stale", "topic: not user facing" ]
2
CONTRIBUTOR
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #143311 * #142063 I hacked together a script to parse skips / xfails for the OpInfo-based tests and visualize the status of passing tests in a table. Results are reported op-wise for `(forward, compile_forward, backward, compile_back...
true
2,743,178,634
Add a check on norm_type in LPPool2d
jackson-tsang578
closed
[ "triaged", "open source", "Stale", "topic: not user facing" ]
9
CONTRIBUTOR
Fixes #134841. Added a check to ensure that the norm_type is not 0 to prevent the division by 0 error. Error messaging now informs the user that norm_type should not be 0.
true