pytorch - ✅(Solved) Fix torch.linalg._powsum docstring advertises out= but it is not implemented [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
pytorch/pytorch#180649Fetched 2026-04-18 05:51:45
View on GitHub
Comments
0
Participants
1
Timeline
24
Reactions
0
Author
Participants
Timeline (top)
mentioned ×10subscribed ×10labeled ×4

Error Message

TypeError: linalg__powsum() got an unexpected keyword argument 'out'

Fix Action

Fix / Workaround

CPU: Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 46 bits physical, 57 bits virtual Byte Order: Little Endian CPU(s): 128 On-line CPU(s) list: 0-127 Vendor ID: GenuineIntel Model name: Intel(R) Xeon(R) Platinum 8462Y+ CPU family: 6 Model: 143 Thread(s) per core: 2 Core(s) per socket: 32 Socket(s): 2 Stepping: 8 CPU(s) scaling MHz: 92% CPU max MHz: 4100.0000 CPU min MHz: 800.0000 BogoMIPS: 5600.00 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect user_shstk avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hfi vnmi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr ibt amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities Virtualization: VT-x L1d cache: 3 MiB (64 instances) L1i cache: 2 MiB (64 instances) L2 cache: 128 MiB (64 instances) L3 cache: 120 MiB (2 instances) NUMA node(s): 2 NUMA node0 CPU(s): 0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126 NUMA node1 CPU(s): 1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,115,117,119,121,123,125,127 Vulnerability Gather data sampling: Not affected Vulnerability Itlb multihit: Not affected Vulnerability L1tf: Not affected Vulnerability Mds: Not affected Vulnerability Meltdown: Not affected Vulnerability Mmio stale data: Not affected Vulnerability Reg file data sampling: Not affected Vulnerability Retbleed: Not affected Vulnerability Spec rstack overflow: Not affected Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Vulnerability Spectre v2: Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI BHI_DIS_S Vulnerability Srbds: Not affected Vulnerability Tsx async abort: Not affected

PR fix notes

PR #180768: Remove unsupported out=None from linalg._powsum

Description (problem / solution / changelog)

Good day

This PR fixes issue #180649: torch.linalg._powsum docstring advertises out= but it is not implemented.

Problem

The Python wrapper function _powsum has out=None in both its signature and docstring, but the underlying aten operator linalg__powsum does not support the out parameter. Calling torch.linalg._powsum(x, 2.0, out=out) raises: TypeError: linalg__powsum() got an unexpected keyword argument 'out'

Fix

Removed the unsupported out=None parameter from:

  1. The function signature in the docstring
  2. The out (Tensor, optional) entry in the keyword args section

No functional changes were made — this is purely a documentation fix to match the actual implementation.

Testing

The fix can be verified by confirming that:

  1. The docstring no longer advertises out
  2. The aten schema for linalg__powsum (queried via torch._C._jit_get_schemas_for_operator) does not include an out parameter

Thank you for your attention. If there are any issues or suggestions, please leave a comment and I will address them promptly.

Warmly, RoomWithOutRoof

cc @EikanWang @jgong5

Changed files

  • .circleci/config.yml (modified, +2/-0)
  • .circleci/scripts/binary_checkout.sh (modified, +1/-1)
  • .circleci/scripts/cpp_doc_push_script.sh (modified, +3/-0)
  • .circleci/scripts/python_doc_push_script.sh (modified, +3/-0)
  • .circleci/verbatim-sources/job-specs/job-specs-custom.yml (modified, +2/-0)
  • .github/templates/common.yml.j2 (modified, +1/-1)
  • .github/templates/linux_binary_build_workflow.yml.j2 (modified, +2/-2)
  • .github/templates/macos_binary_build_workflow.yml.j2 (modified, +2/-2)
  • .github/templates/windows_binary_build_workflow.yml.j2 (modified, +4/-4)
  • .github/workflows/_binary-build-linux.yml (modified, +1/-2)
  • .github/workflows/_binary-test-linux.yml (modified, +0/-1)
  • .github/workflows/_binary-upload.yml (modified, +1/-0)
  • .github/workflows/_mac-build.yml (modified, +1/-0)
  • .github/workflows/_mac-test.yml (modified, +1/-0)
  • .github/workflows/_rocm-test.yml (modified, +1/-0)
  • .github/workflows/docker-release.yml (modified, +5/-1)
  • .github/workflows/generated-linux-binary-libtorch-cxx11-abi-nightly.yml (modified, +4/-8)
  • .github/workflows/generated-linux-binary-libtorch-pre-cxx11-nightly.yml (modified, +4/-8)
  • .github/workflows/generated-linux-binary-manywheel-nightly.yml (modified, +8/-16)
  • .github/workflows/generated-macos-arm64-binary-conda-nightly.yml (modified, +3/-6)
  • .github/workflows/generated-macos-arm64-binary-wheel-nightly.yml (modified, +4/-8)
  • .github/workflows/generated-macos-binary-conda-nightly.yml (modified, +4/-8)
  • .github/workflows/generated-macos-binary-libtorch-cxx11-abi-nightly.yml (modified, +4/-8)
  • .github/workflows/generated-macos-binary-libtorch-pre-cxx11-nightly.yml (modified, +4/-8)
  • .github/workflows/generated-macos-binary-wheel-nightly.yml (modified, +4/-8)
  • .github/workflows/generated-windows-binary-conda-nightly.yml (modified, +24/-48)
  • .github/workflows/generated-windows-binary-libtorch-debug-master.yml (modified, +2/-4)
  • .github/workflows/generated-windows-binary-libtorch-debug-nightly.yml (modified, +24/-48)
  • .github/workflows/generated-windows-binary-libtorch-release-master.yml (modified, +2/-4)
  • .github/workflows/generated-windows-binary-libtorch-release-nightly.yml (modified, +24/-48)
  • .github/workflows/generated-windows-binary-wheel-nightly.yml (modified, +24/-48)
  • .github/workflows/pull.yml (modified, +0/-20)
  • .gitignore (modified, +0/-4)
  • .jenkins/pytorch/build.sh (modified, +0/-6)
  • .jenkins/pytorch/common_utils.sh (modified, +1/-1)
  • .jenkins/pytorch/test.sh (modified, +1/-14)
  • .lintrunner.toml (modified, +0/-7)
  • BUILD.bazel (modified, +0/-1)
  • CMakeLists.txt (modified, +0/-8)
  • aten/src/ATen/Context.cpp (modified, +1/-1)
  • aten/src/ATen/PadNd.h (renamed, +9/-5)
  • aten/src/ATen/TensorIterator.cpp (modified, +10/-1)
  • aten/src/ATen/cuda/detail/CUDAHooks.cpp (modified, +15/-0)
  • aten/src/ATen/functorch/BatchRulesDecompositions.cpp (modified, +1/-0)
  • aten/src/ATen/functorch/BatchRulesLinearAlgebra.cpp (modified, +5/-3)
  • aten/src/ATen/mps/MPSFallback.mm (modified, +15/-0)
  • aten/src/ATen/native/Linear.cpp (modified, +17/-5)
  • aten/src/ATen/native/Normalization.cpp (modified, +1/-2)
  • aten/src/ATen/native/PadNd.cpp (modified, +1/-1)
  • aten/src/ATen/native/cuda/jit_utils.cpp (modified, +2/-0)
  • aten/src/ATen/native/mps/operations/BitwiseOps.mm (modified, +4/-1)
  • aten/src/ATen/native/mps/operations/Copy.mm (modified, +54/-31)
  • caffe2/CMakeLists.txt (modified, +0/-9)
  • cmake/Summary.cmake (modified, +0/-1)
  • docs/source/_static/img/masked/tensor_comparison.jpg (added, +0/-0)
  • docs/source/community/governance.rst (modified, +17/-0)
  • docs/source/conf.py (modified, +28/-2)
  • docs/source/deploy.rst (modified, +3/-238)
  • docs/source/masked.rst (modified, +291/-5)
  • docs/source/nested.rst (modified, +76/-17)
  • docs/source/sparse.rst (modified, +195/-48)
  • docs/source/torch.rst (modified, +0/-1)
  • functorch/_src/eager_transforms.py (modified, +12/-15)
  • functorch/docs/source/_templates/layout.html (added, +9/-0)
  • functorch/docs/source/conf.py (modified, +3/-3)
  • functorch/docs/source/install.rst (modified, +12/-3)
  • functorch/notebooks/aot_autograd_optimizations.ipynb (modified, +8/-2)
  • functorch/notebooks/ensembling.ipynb (modified, +1/-1)
  • functorch/notebooks/jacobians_hessians.ipynb (modified, +1/-1)
  • functorch/notebooks/neural_tangent_kernels.ipynb (modified, +1/-1)
  • functorch/notebooks/per_sample_grads.ipynb (modified, +1/-1)
  • functorch/notebooks/whirlwind_tour.ipynb (modified, +1/-1)
  • functorch/packaging/pkg_helpers.bash (modified, +1/-1)
  • functorch/test/test_vmap.py (modified, +9/-2)
  • ios/TestApp/TestApp/Benchmark.h (modified, +3/-0)
  • ios/TestApp/TestApp/Benchmark.mm (modified, +3/-0)
  • ios/TestApp/TestApp/ViewController.mm (modified, +7/-0)
  • ios/TestApp/benchmark/setup.rb (modified, +5/-0)
  • setup.py (modified, +3/-7)
  • test/cpp/api/CMakeLists.txt (modified, +0/-9)
  • test/cpp/api/imethod.cpp (removed, +0/-64)
  • test/cpp/tensorexpr/test_kernel.cpp (modified, +23/-0)
  • test/cpp/tensorexpr/test_loopnest.cpp (modified, +2/-2)
  • test/distributed/test_c10d_common.py (modified, +12/-0)
  • test/onnx/internal/test_diagnostics.py (modified, +0/-1)
  • test/onnx/test_pytorch_onnx_onnxruntime.py (modified, +44/-7)
  • test/onnx/test_utility_funs.py (modified, +149/-37)
  • test/run_test.py (modified, +5/-1)
  • test/test_autograd.py (modified, +1/-1)
  • test/test_mps.py (modified, +41/-2)
  • test/test_nn.py (modified, +13/-14)
  • test/test_serialization.py (modified, +71/-28)
  • test/test_stateless.py (modified, +30/-0)
  • test/test_transformers.py (modified, +54/-0)
  • test/test_vmap.py (modified, +2/-1)
  • tools/linter/clang_tidy/generate_build_files.py (modified, +0/-1)
  • torch/CMakeLists.txt (modified, +0/-84)
  • torch/_C/__init__.pyi.in (modified, +0/-1)
  • torch/_C/_distributed_c10d.pyi (modified, +1/-2)
  • torch/__init__.py (modified, +0/-2)

Code Example

import torch

x = torch.tensor([1., 2., 3.])
out = torch.empty(())

# 1. The docstring promises it.
assert "out (Tensor, optional)" in torch.linalg._powsum.__doc__

# 2. The aten schema has no out parameter.
(schema,) = torch._C._jit_get_schemas_for_operator("aten::linalg__powsum")
print("schema:", schema)

# 3. Calling with out= raises.
torch.linalg._powsum(x, 2.0, out=out)

---

TypeError: linalg__powsum() got an unexpected keyword argument 'out'

---

PyTorch version: 2.11.0
Is debug build: False
CUDA used to build PyTorch: 13.2
ROCM used to build PyTorch: N/A

OS: Ubuntu 24.04.4 LTS (x86_64)
GCC version: (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
Clang version: Could not collect
CMake version: version 4.3.0
Libc version: glibc-2.39

Python version: 3.12.3 (main, Mar  3 2026, 12:15:18) [GCC 13.3.0] (64-bit runtime)
Python platform: Linux-6.8.12-680-6063-coreweave-amd64-f81899c8-x86_64-with-glibc2.39
Is CUDA available: True
CUDA runtime version: 13.2.51
CUDA_MODULE_LOADING set to: 
GPU models and configuration: GPU 0: NVIDIA H100 80GB HBM3
Nvidia driver version: 580.126.20
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.9.20.0
/usr/lib/x86_64-linux-gnu/libcudnn_adv.so.9.20.0
/usr/lib/x86_64-linux-gnu/libcudnn_cnn.so.9.20.0
/usr/lib/x86_64-linux-gnu/libcudnn_engines_precompiled.so.9.20.0
/usr/lib/x86_64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.20.0
/usr/lib/x86_64-linux-gnu/libcudnn_graph.so.9.20.0
/usr/lib/x86_64-linux-gnu/libcudnn_heuristic.so.9.20.0
/usr/lib/x86_64-linux-gnu/libcudnn_ops.so.9.20.0
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture:                         x86_64
CPU op-mode(s):                       32-bit, 64-bit
Address sizes:                        46 bits physical, 57 bits virtual
Byte Order:                           Little Endian
CPU(s):                               128
On-line CPU(s) list:                  0-127
Vendor ID:                            GenuineIntel
Model name:                           Intel(R) Xeon(R) Platinum 8462Y+
CPU family:                           6
Model:                                143
Thread(s) per core:                   2
Core(s) per socket:                   32
Socket(s):                            2
Stepping:                             8
CPU(s) scaling MHz:                   92%
CPU max MHz:                          4100.0000
CPU min MHz:                          800.0000
BogoMIPS:                             5600.00
Flags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect user_shstk avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hfi vnmi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr ibt amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities
Virtualization:                       VT-x
L1d cache:                            3 MiB (64 instances)
L1i cache:                            2 MiB (64 instances)
L2 cache:                             128 MiB (64 instances)
L3 cache:                             120 MiB (2 instances)
NUMA node(s):                         2
NUMA node0 CPU(s):                    0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126
NUMA node1 CPU(s):                    1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,115,117,119,121,123,125,127
Vulnerability Gather data sampling:   Not affected
Vulnerability Itlb multihit:          Not affected
Vulnerability L1tf:                   Not affected
Vulnerability Mds:                    Not affected
Vulnerability Meltdown:               Not affected
Vulnerability Mmio stale data:        Not affected
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed:               Not affected
Vulnerability Spec rstack overflow:   Not affected
Vulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:             Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI BHI_DIS_S
Vulnerability Srbds:                  Not affected
Vulnerability Tsx async abort:        Not affected

Versions of relevant libraries:
[pip3] clip-anytorch==2.6.0
[pip3] dctorch==0.1.2
[pip3] DISTS_pytorch==0.1
[pip3] lovely-numpy==0.2.22
[pip3] mypy_extensions==1.1.0
[pip3] numpy==1.26.4
[pip3] onnx==1.20.1
[pip3] onnx-ir==0.2.0
[pip3] onnxscript==0.6.2
[pip3] torch==2.11.0
[pip3] torch_c_dlpack_ext==0.1.5
[pip3] torchaudio==2.11.0
[pip3] torchdata==0.11.0
[pip3] torchdiffeq==0.2.5
[pip3] torchsde==0.2.6
[pip3] torchtitan==0.1.0
[pip3] torchvision==0.26.0
[pip3] triton==3.6.0+git9844da95
[pip3] welford-torch==0.2.5
[conda] Could not collect
RAW_BUFFERClick to expand / collapse

🐛 Describe the bug

@pianpwk From Claude:

import torch

x = torch.tensor([1., 2., 3.])
out = torch.empty(())

# 1. The docstring promises it.
assert "out (Tensor, optional)" in torch.linalg._powsum.__doc__

# 2. The aten schema has no out parameter.
(schema,) = torch._C._jit_get_schemas_for_operator("aten::linalg__powsum")
print("schema:", schema)

# 3. Calling with out= raises.
torch.linalg._powsum(x, 2.0, out=out)

Output:

TypeError: linalg__powsum() got an unexpected keyword argument 'out'

Versions

PyTorch version: 2.11.0
Is debug build: False
CUDA used to build PyTorch: 13.2
ROCM used to build PyTorch: N/A

OS: Ubuntu 24.04.4 LTS (x86_64)
GCC version: (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
Clang version: Could not collect
CMake version: version 4.3.0
Libc version: glibc-2.39

Python version: 3.12.3 (main, Mar  3 2026, 12:15:18) [GCC 13.3.0] (64-bit runtime)
Python platform: Linux-6.8.12-680-6063-coreweave-amd64-f81899c8-x86_64-with-glibc2.39
Is CUDA available: True
CUDA runtime version: 13.2.51
CUDA_MODULE_LOADING set to: 
GPU models and configuration: GPU 0: NVIDIA H100 80GB HBM3
Nvidia driver version: 580.126.20
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.9.20.0
/usr/lib/x86_64-linux-gnu/libcudnn_adv.so.9.20.0
/usr/lib/x86_64-linux-gnu/libcudnn_cnn.so.9.20.0
/usr/lib/x86_64-linux-gnu/libcudnn_engines_precompiled.so.9.20.0
/usr/lib/x86_64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.20.0
/usr/lib/x86_64-linux-gnu/libcudnn_graph.so.9.20.0
/usr/lib/x86_64-linux-gnu/libcudnn_heuristic.so.9.20.0
/usr/lib/x86_64-linux-gnu/libcudnn_ops.so.9.20.0
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture:                         x86_64
CPU op-mode(s):                       32-bit, 64-bit
Address sizes:                        46 bits physical, 57 bits virtual
Byte Order:                           Little Endian
CPU(s):                               128
On-line CPU(s) list:                  0-127
Vendor ID:                            GenuineIntel
Model name:                           Intel(R) Xeon(R) Platinum 8462Y+
CPU family:                           6
Model:                                143
Thread(s) per core:                   2
Core(s) per socket:                   32
Socket(s):                            2
Stepping:                             8
CPU(s) scaling MHz:                   92%
CPU max MHz:                          4100.0000
CPU min MHz:                          800.0000
BogoMIPS:                             5600.00
Flags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect user_shstk avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hfi vnmi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr ibt amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities
Virtualization:                       VT-x
L1d cache:                            3 MiB (64 instances)
L1i cache:                            2 MiB (64 instances)
L2 cache:                             128 MiB (64 instances)
L3 cache:                             120 MiB (2 instances)
NUMA node(s):                         2
NUMA node0 CPU(s):                    0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126
NUMA node1 CPU(s):                    1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,115,117,119,121,123,125,127
Vulnerability Gather data sampling:   Not affected
Vulnerability Itlb multihit:          Not affected
Vulnerability L1tf:                   Not affected
Vulnerability Mds:                    Not affected
Vulnerability Meltdown:               Not affected
Vulnerability Mmio stale data:        Not affected
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed:               Not affected
Vulnerability Spec rstack overflow:   Not affected
Vulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:             Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI BHI_DIS_S
Vulnerability Srbds:                  Not affected
Vulnerability Tsx async abort:        Not affected

Versions of relevant libraries:
[pip3] clip-anytorch==2.6.0
[pip3] dctorch==0.1.2
[pip3] DISTS_pytorch==0.1
[pip3] lovely-numpy==0.2.22
[pip3] mypy_extensions==1.1.0
[pip3] numpy==1.26.4
[pip3] onnx==1.20.1
[pip3] onnx-ir==0.2.0
[pip3] onnxscript==0.6.2
[pip3] torch==2.11.0
[pip3] torch_c_dlpack_ext==0.1.5
[pip3] torchaudio==2.11.0
[pip3] torchdata==0.11.0
[pip3] torchdiffeq==0.2.5
[pip3] torchsde==0.2.6
[pip3] torchtitan==0.1.0
[pip3] torchvision==0.26.0
[pip3] triton==3.6.0+git9844da95
[pip3] welford-torch==0.2.5
[conda] Could not collect

cc @svekars @sekyondaMeta @AlannaBurke @jianyuh @nikitaved @mruberry @walterddr @xwang233 @Lezcano

extent analysis

TL;DR

The issue can be resolved by removing the out parameter when calling torch.linalg._powsum as it is not supported despite being mentioned in the docstring.

Guidance

  • The error message TypeError: linalg__powsum() got an unexpected keyword argument 'out' indicates that the out parameter is not expected by the function.
  • The docstring of torch.linalg._powsum mentions out (Tensor, optional), but the actual implementation does not support this parameter.
  • To fix the issue, remove the out parameter when calling torch.linalg._powsum, like this: torch.linalg._powsum(x, 2.0).
  • Verify that the function call works as expected without the out parameter.

Example

import torch

x = torch.tensor([1., 2., 3.])
result = torch.linalg._powsum(x, 2.0)
print(result)

Notes

  • The discrepancy between the docstring and the actual implementation may be a bug in the PyTorch library.
  • The fix is to simply remove the out parameter, which may not be the intended behavior according to the docstring.

Recommendation

Apply workaround: Remove the out parameter when calling torch.linalg._powsum to resolve the immediate issue, but also consider reporting the discrepancy between the docstring and the implementation to the PyTorch developers.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

pytorch - ✅(Solved) Fix torch.linalg._powsum docstring advertises out= but it is not implemented [1 pull requests, 1 participants]