Skip to content

PyTorch 2.0 nightly: compile does not support capabilities sm_89 (RTX 4090 and others) #95082

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pcuenca opened this issue Feb 17, 2023 · 20 comments
Assignees
Labels
module: inductor oncall: pt2 triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Milestone

Comments

@pcuenca
Copy link

pcuenca commented Feb 17, 2023

🐛 Describe the bug

Trying the nightlies today (20230217) on RTX 4090 I get the following error when attempting to use compile():

RuntimeError: Internal Triton PTX codegen error:
ptxas /tmp/filelSnH8K, line 6; error   : PTX .version 7.4 does not support .target sm_89
ptxas fatal   : Ptx assembly aborted due to errors

As mentioned in #95081, the resolved nightly is 2.0.0.dev20230213+cu118.

Repeating the same test with the cuda 11.7 wheels, the behavior is identical.

Error logs

concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/pedro/miniconda/envs/hf/lib/python3.9/concurrent/futures/process.py", line 246, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_inductor/codecache.py", line 549, in _worker_compile
kernel.precompile(warm_cache_only_with_cc=cc)
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_inductor/triton_ops/autotune.py", line 69, in precompile
self.launchers = [
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_inductor/triton_ops/autotune.py", line 70, in
self._precompile_config(c, warm_cache_only_with_cc)
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_inductor/triton_ops/autotune.py", line 83, in _precompile_config
triton.compile(
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/triton/compiler.py", line 1256, in compile
asm, shared, kernel_name = _compile(fn, signature, device, constants, configs[0], num_warps, num_stages,
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/triton/compiler.py", line 901, in _compile
name, asm, shared_mem = _triton.code_gen.compile_ttir(backend, module, device, num_warps, num_stages, extern_libs, cc)
RuntimeError: Internal Triton PTX codegen error:
ptxas /tmp/filelSnH8K, line 6; error : PTX .version 7.4 does not support .target sm_89
ptxas fatal : Ptx assembly aborted due to errors

"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/dynamo/output_graph.py", line 670, in call_user_compiler
compiled_fn = compiler_fn(gm, self.fake_example_inputs())
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/dynamo/debug_utils.py", line 1055, in debug_wrapper
compiled_gm = compiler_fn(gm, example_inputs)
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/init.py", line 1374, in call
return self.compile_fn(model
, inputs
, config_patches=self.config)
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_inductor/compile_fx.py", line 453, in compile_fx
return aot_autograd(
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_dynamo/backends/common.py", line 48, in compiler_fn
cg = aot_module_simplified(gm, example_inputs, **kwargs)
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_functorch/aot_autograd.py", line 2481, in aot_module_simplified
compiled_fn = create_aot_dispatcher_function(
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_dynamo/utils.py", line 163, in time_wrapper
r = func(*args, **kwargs)
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_functorch/aot_autograd.py", line 2178, in create_aot_dispatcher_function
compiled_fn = compiler_fn(flat_fn, fake_flat_args, aot_config)
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_functorch/aot_autograd.py", line 1412, in aot_wrapper_dedupe
return compiler_fn(flat_fn, leaf_flat_args, aot_config)
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_functorch/aot_autograd.py", line 1062, in aot_dispatch_base
compiled_fw = aot_config.fw_compiler(fw_module, flat_args)
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_dynamo/utils.py", line 163, in time_wrapper
r = func(*args, **kwargs)
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_inductor/compile_fx.py", line 428, in fw_compiler
return inner_compile(
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_dynamo/debug_utils.py", line 595, in debug_wrapper
compiled_fn = compiler_fn(gm, example_inputs)
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_inductor/debug.py", line 239, in inner
return fn(*args, **kwargs)
File "/home/pedro/miniconda/envs/hf/lib/python3.9/contextlib.py", line 79, in inner
return func(*args, **kwds)
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_inductor/compile_fx.py", line 177, in compile_fx_inner
compiled_fn = graph.compile_to_fn()
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_inductor/graph.py", line 586, in compile_to_fn
return self.compile_to_module().call
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_dynamo/utils.py", line 163, in time_wrapper
r = func(*args, **kwargs)
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_inductor/graph.py", line 575, in compile_to_module
mod = PyCodeCache.load(code)
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_inductor/codecache.py", line 528, in load
exec(code, mod.dict, mod.dict)
File "/tmp/torchinductor_pedro/b4/cb4wgmozs4bqzsoemk2mnsij7oypadaj3znkbzxbgpyxre3st3cy.py", line 104, in
async_compile.wait(globals())
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_inductor/codecache.py", line 715, in wait
scope[key] = result.result()
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_inductor/codecache.py", line 573, in result
self.future.result()
File "/home/pedro/miniconda/envs/hf/lib/python3.9/concurrent/futures/_base.py", line 446, in result
return self.__get_result()
File "/home/pedro/miniconda/envs/hf/lib/python3.9/concurrent/futures/_base.py", line 391, in __get_result
raise self._exception
RuntimeError: Internal Triton PTX codegen error:
ptxas /tmp/filelSnH8K, line 6; error : PTX .version 7.4 does not support .target sm_89
ptxas fatal : Ptx assembly aborted due to errors

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/pedro/code/bench/benchmark_diffusers_pt2.py", line 47, in
do_tests(bs)
File "/home/pedro/code/bench/benchmark_diffusers_pt2.py", line 38, in do_tests
pipe(prompt, num_inference_steps=steps, num_images_per_prompt=batch_size).images
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/home/pedro/code/diffusers/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py", line 643, in call
noise_pred = self.unet(
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_dynamo/eval_frame.py", line 82, in forward
return self.dynamo_ctx(self._orig_mod.forward)(*args, **kwargs)
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_dynamo/eval_frame.py", line 209, in _fn
return fn(*args, **kwargs)
File "/home/pedro/code/diffusers/src/diffusers/models/unet_2d_condition.py", line 554, in forward
t_emb = self.time_proj(timesteps)
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_dynamo/eval_frame.py", line 330, in catch_errors
return callback(frame, cache_size, hooks)
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_dynamo/convert_frame.py", line 404, in _convert_frame
result = inner_convert(frame, cache_size, hooks)
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_dynamo/convert_frame.py", line 104, in _fn
return fn(*args, **kwargs)
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_dynamo/convert_frame.py", line 262, in _convert_frame_assert
return _compile(
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_dynamo/utils.py", line 163, in time_wrapper
r = func(*args, **kwargs)
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_dynamo/convert_frame.py", line 324, in _compile
out_code = transform_code_object(code, transform)
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_dynamo/bytecode_transformation.py", line 376, in transform_code_object
transformations(instructions, code_options)
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_dynamo/convert_frame.py", line 311, in transform
tracer.run()
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_dynamo/symbolic_convert.py", line 1681, in run
super().run()
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_dynamo/symbolic_convert.py", line 569, in run
and self.step()
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_dynamo/symbolic_convert.py", line 532, in step
getattr(self, inst.opname)(inst)
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_dynamo/symbolic_convert.py", line 1747, in RETURN_VALUE
self.output.compile_subgraph(
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_dynamo/output_graph.py", line 517, in compile_subgraph
self.compile_and_call_fx_graph(tx, list(reversed(stack_values)), root)
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_dynamo/output_graph.py", line 588, in compile_and_call_fx_graph
compiled_fn = self.call_user_compiler(gm)
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_dynamo/utils.py", line 163, in time_wrapper
r = func(*args, **kwargs)
File "/home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/torch/_dynamo/output_graph.py", line 675, in call_user_compiler
raise BackendCompilerFailed(self.compiler_fn, e) from e
torch._dynamo.exc.BackendCompilerFailed: debug_wrapper raised RuntimeError: Internal Triton PTX codegen error:
ptxas /tmp/filelSnH8K, line 6; error : PTX .version 7.4 does not support .target sm_89
ptxas fatal : Ptx assembly aborted due to errors

You can suppress this exception and fall back to eager by setting:
torch._dynamo.config.suppress_errors = True

Minified repro

No response

Versions

PyTorch version: 2.0.0.dev20230213+cu118
Is debug build: False
CUDA used to build PyTorch: 11.8
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.1 LTS (x86_64)
GCC version: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
Clang version: Could not collect
CMake version: version 3.25.0
Libc version: glibc-2.35

Python version: 3.9.16 (main, Jan 11 2023, 16:05:54) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-5.15.0-60-generic-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration:
GPU 0: NVIDIA GeForce RTX 4090
GPU 1: NVIDIA GeForce RTX 4090

Nvidia driver version: 525.85.12
cuDNN version: Could not collect
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: 48 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 32
On-line CPU(s) list: 0-31
Vendor ID: AuthenticAMD
Model name: AMD Ryzen 9 7950X 16-Core Processor
CPU family: 25
Model: 97
Thread(s) per core: 2
Core(s) per socket: 16
Socket(s): 1
Stepping: 2
Frequency boost: enabled
CPU max MHz: 5879.8818
CPU min MHz: 3000.0000
BogoMIPS: 9000.38
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local avx512_bf16 clzero irperf xsaveerptr rdpru wbnoinvd cppc arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif v_spec_ctrl avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid overflow_recov succor smca fsrm flush_l1d
Virtualization: AMD-V
L1d cache: 512 KiB (16 instances)
L1i cache: 512 KiB (16 instances)
L2 cache: 16 MiB (16 instances)
L3 cache: 64 MiB (2 instances)
NUMA node(s): 1
NUMA node0 CPU(s): 0-31
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Not affected
Vulnerability Retbleed: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIBP always-on, RSB filling, PBRSB-eIBRS Not affected
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected

Versions of relevant libraries:
[pip3] numpy==1.24.1
[pip3] pytorch-triton==2.0.0+0d7e753227
[pip3] torch==2.0.0.dev20230213+cu118
[pip3] torchvision==0.15.0.dev20230217+cu118
[conda] numpy 1.24.1 pypi_0 pypi
[conda] pytorch-triton 2.0.0+0d7e753227 pypi_0 pypi
[conda] torch 2.0.0.dev20230213+cu118 pypi_0 pypi
[conda] torchvision 0.15.0.dev20230217+cu118 pypi_0 pypi

cc @ezyang @soumith @msaroufim @wconstab @ngimel @bdhirsh @voznesenskym @yanboliang @penguinwu @anijain2305 @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @peterbell10 @desertfire

@seemethere seemethere added module: cuda Related to torch.cuda, and CUDA support in general and removed module: cuda Related to torch.cuda, and CUDA support in general labels Feb 17, 2023
@jansel
Copy link
Contributor

jansel commented Feb 17, 2023

@ptillet this looks like it is coming from Triton. Does Triton support sm_89?

@ptillet
Copy link

ptillet commented Feb 17, 2023

It should support sm_89 since triton-lang/triton@3e8d83b -- which is part of release/2.0.x. I don't have an sm_89 GPU though so I am not able to try it out.

@ptillet
Copy link

ptillet commented Feb 17, 2023

pytorch-triton 2.0.0+0d7e753227 pypi_0 pypi this is pre-MLIR rewrite, so I think that's why.

@jansel
Copy link
Contributor

jansel commented Feb 18, 2023

@pcuenca can you try upgrading Triton and see if that fixes this?

pip install triton==2.0.0a2

@malfet is there an issue with dependencies causing the wrong version of Triton to get installed along with our nightlies?

Perhaps we need some sort of version check that issues a warning if users don't have the proper Triton installed.

@pcuenca
Copy link
Author

pcuenca commented Feb 18, 2023

@jansel I get multiple messages like this after upgrading Triton:

'sm_89' is not a recognized processor for this target (ignoring processor)

@ptrblck
Copy link
Collaborator

ptrblck commented Feb 18, 2023

I've seen similar error messages raised by LLVM from here, but don't know why sm_89 would be passed as a CPU architecture (the raising line of code might be wrong).

@egaebel
Copy link

egaebel commented Feb 20, 2023

I'm having the same sort of problem on an RTX 6000 Ada when trying to use torch.compile in pytorch 2.0.

The exact error I get is:

torch._dynamo.exc.BackendCompilerFailed: debug_wrapper raised RuntimeError: Internal Triton PTX codegen error: 
ptxas fatal   : Value 'sm_89' is not defined for option 'gpu-name'

From reading around elsewhere I was under the impression that this change in triton is required to fix it?

triton-lang/triton#1070

@ngimel
Copy link
Collaborator

ngimel commented Feb 20, 2023

Triton uses ptxas v12, so it should support sm_89 even before rebasing to llvm15. Triton package on pypi https://pypi.org/project/triton/2.0.0a2/ packages ptxas v12, but something is going wrong with triton packaging in pytorch pytorch/builder#1318, until that is resolved try installing triton package 2.0.0.a2

@egaebel
Copy link

egaebel commented Feb 20, 2023

I get the same repeated messages as @pcuenca after pip install triton==2.0.0.a2 ('sm_89' is not a recognized processor for this target (ignoring processor)). I also am not seeing training progress.

I should note, that I still have 'pytorch-triton==2.0.0+c8bfe3f548' installed after installing 'triton==2.0.0.a2'. Removing pytorch-triton causes the error "torch._dynamo.exc.BackendCompilerFailed: debug_wrapper raised ImportError: cannot import name 'next_power_of_2' from 'triton' (unknown location)" to be thrown instead.

@jansel
Copy link
Contributor

jansel commented Feb 20, 2023

I think there might be an issue with pytorch-triton and triton both being installed.

Can you try:

  1. Uninstall (both) Triton:
pip uninstall pytorch-triton
pip uninstall triton
  1. Reinstall Triton:
pip install triton==2.0.0.a2

@egaebel
Copy link

egaebel commented Feb 21, 2023

Tried uninstalling both and reinstalling triton==2.0.0.a2. First I had to suppress some dependency issues when running pip since torch requires pytorch-triton to be installed.

pip install --no-deps triton==2.0.0.a2

When I got it installed I got a much longer pause than I did the first time, but it eventually started spitting out a similar message, interestingly it looks like some weird nesting is happening?

''sm_89sm_89' is not a recognized processor for this target' is not a recognized processor for this target (ignoring processor)                                                                                                                                                           
 (ignoring processor)

then it spit out tons of the same message as before:

'sm_89' is not a recognized processor for this target (ignoring processor)

Finally it spit out a bunch of python code that looked like it was being converted by the compiler:

import triton                                                                                                                                                                                                                                                                             
import triton.language as tl                                                                                                                                                                                                                                                              
from torch._inductor.ir import ReductionHint                                                                                                                                                                                                                                              
from torch._inductor.ir import TileHint                                                                                                                                                                                                                                                   
from torch._inductor.triton_ops.autotune import persistent_reduction                                                                                                                                                                                                                      
from torch._inductor.utils import instance_descriptor                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                          
@persistent_reduction(                                                                                                                                                                                                                                                                    
    size_hints=[512, 32],                                                                                                                    
    reduction_hint=ReductionHint.DEFAULT,                                                                                                    
    filename=__file__,                                                                                                                       
    meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp16', 4: '*fp32', 5: '*fp32', 6: '*fp32', 7: '*fp32', 8: '*fp32', 9: '*fp32', 10: '*fp32', 11: '*fp32', 12: '*fp32', 13: '*fp32', 14: '*fp32', 15: '*fp32', 16: '*fp32', 17: '*fp32', 18: '*fp32', 19: '*fp32', 20: '*fp
32', 21: '*fp32', 22: '*fp32', 23: '*fp32', 24: '*fp32', 25: '*fp32', 26: '*fp32', 27: '*fp32', 28: '*fp32', 29: '*fp32', 30: '*fp32', 31: '*fp32', 32: '*fp32', 33: '*fp32', 34: '*fp32', 35: '*fp32', 36: '*fp32', 37: '*fp32', 38: '*fp32', 39: '*fp32', 40: '*fp32', 41: '*fp32', 42: 
'*fp32', 43: '*fp32', 44: '*fp32', 45: '*fp32', 46: '*fp32', 47: '*fp32', 48: '*fp32', 49: '*fp32', 50: '*fp32', 51: '*fp32', 52: '*fp32', 53: '*fp32', 54: '*fp32', 55: '*fp32', 56: '*fp32', 57: '*fp32', 58: '*fp32', 59: '*fp32', 60: '*fp32', 61: '*fp32', 62: '*fp32', 63: '*fp32', 
64: '*fp32', 65: '*fp32', 66: '*fp32', 67: '*fp32', 68: '*fp32', 69: '*fp32', 70: '*fp32', 71: '*fp32', 72: '*fp32', 73: '*fp32', 74: '*fp32', 75: '*fp32', 76: '*fp32', 77: '*fp32', 78: '*fp32', 79: '*fp32', 80: '*fp32', 81: '*fp32', 82: '*fp32', 83: '*fp32', 84: '*fp32', 85: '*fp3
2', 86: '*fp32', 87: '*fp32', 88: '*fp32', 89: '*fp32', 90: '*fp32', 91: '*fp32', 92: '*fp32', 93: '*fp32', 94: '*fp32', 95: '*fp32', 96: '*fp32', 97: '*fp32', 98: '*fp32', 99: '*fp32', 100: '*fp32', 101: '*fp32', 102: '*fp32', 103: '*fp32', 104: '*fp32', 105: '*fp32', 106: '*fp32'
, 107: '*fp32', 108: '*fp32', 109: '*fp32', 110: '*fp32', 111: '*fp32', 112: '*fp32', 113: '*fp32', 114: '*fp32', 115: '*fp32', 116: '*fp32', 117: '*fp32', 118: '*fp32', 119: '*fp32', 120: '*fp32', 121: '*fp32', 122: '*fp32', 123: '*fp32', 124: '*fp32', 125: '*fp32', 126: '*fp32', 
127: '*fp32', 128: '*fp32', 129: '*fp32', 130: '*fp32', 131: '*fp32', 132: '*fp32', 133: '*fp32', 134: '*fp32', 135: '*fp32', 136: '*fp32', 137: '*fp32', 138: '*fp32', 139: '*fp32', 140: '*fp32', 141: '*fp32', 142: '*fp32', 143: '*fp32', 144: '*fp32', 145: '*fp32', 146: '*fp32', 14
7: '*fp32', 148: '*fp32', 149: '*fp32', 150: '*fp32', 151: '*fp32', 152: '*fp32', 153: '*fp32', 154: '*fp32', 155: '*fp32', 156: '*fp32', 157: '*fp32', 158: '*fp32', 159: '*fp32', 160: '*fp32', 161: '*fp32', 162: '*fp32', 163: '*fp32', 164: '*fp32', 165: '*fp32', 166: '*fp32', 167:
 '*fp32', 168: '*fp32', 169: '*fp32', 170: '*fp32', 171: '*fp32', 172: '*fp32', 173: '*fp32', 174: '*fp32', 175: '*fp32', 176: '*fp32', 177: '*fp32', 178: '*fp32', 179: '*fp32', 180: '*fp32', 181: '*fp32', 182: '*fp32', 183: '*fp32', 184: '*fp32', 185: '*fp32', 186: '*fp32', 187: '
*fp32', 188: '*fp32', 189: '*fp32', 190: '*fp32', 191: '*fp32', 192: '*fp32', 193: '*fp32', 194: '*fp32', 195: '*fp32', 196: '*fp32', 197: '*fp32', 198: '*fp32', 199: '*fp32', 200: '*fp32', 201: '*fp32', 202: '*fp32', 203: '*fp32', 204: '*fp32', 205: '*fp32', 206: '*fp32', 207: '*f
p32', 208: '*fp32', 209: '*fp32', 210: '*fp32', 211: '*fp32', 212: '*fp32', 213: '*fp32', 214: '*fp32', 215: '*fp32', 216: '*fp32', 217: '*fp32', 218: '*fp32', 219: '*fp32', 220: '*fp32', 221: '*fp32', 222: '*fp32', 223: '*fp32', 224: '*fp32', 225: '*fp32', 226: '*fp32', 227: '*fp3
2', 228: '*fp32', 229: '*fp32', 230: '*fp32', 231: '*fp32', 232: '*fp32', 233: '*fp32', 234: '*fp32', 235: '*fp32', 236: '*fp32', 237: '*fp32', 238: '*fp32', 239: '*fp32', 240: '*fp32', 241: '*fp32', 242: '*fp32', 243: '*fp32', 244: '*fp32', 245: '*fp32', 246: '*fp32', 247: '*fp32'
, 248: '*fp32', 249: '*fp32', 250: '*fp32', 251: '*fp32', 252: '*fp32', 253: '*fp32', 254: '*fp32', 255: '*fp32', 256: '*fp32', 257: '*fp32', 258: '*fp32', 259: '*fp32', 260: '*fp32', 261: '*fp32', 262: '*fp32', 263: '*fp32', 264: '*fp32', 265: '*fp32', 266: '*fp32', 267: '*fp32', 
268: '*fp32', 269: '*fp32', 270: '*fp32', 271: '*fp32', 272: '*fp32', 273: '*fp32', 274: '*fp32', 275: '*fp32', 276: '*fp32', 277: '*fp32', 278: '*fp32', 279: '*fp32', 280: '*fp32', 281: '*fp32', 282: '*fp32', 283: '*fp32', 284: '*fp32', 285: '*fp32', 286: '*fp32', 287: '*fp32', 28
8: '*fp32', 289: '*fp32', 290: '*fp32', 291: '*fp32', 292: '*fp32', 293: '*fp32', 294: '*fp32', 295: '*fp32', 296: '*fp32', 297: '*fp32', 298: '*fp32', 299: '*fp32', 300: '*fp32', 301: '*fp32', 302: '*fp32', 303: '*fp32', 304: '*fp32', 305: '*fp32', 306: '*fp32', 307: '*fp32', 308:
 '*fp32', 309: '*fp32', 310: '*fp32', 311: '*fp32', 312: '*fp32', 313: '*fp32', 314: '*fp32', 315: '*fp32', 316: '*fp32', 317: '*fp32', 318: '*fp32', 319: '*fp32', 320: '*fp32', 321: '*fp32', 322: '*fp32', 323: '*fp32', 324: '*fp32', 325: '*fp32', 326: '*fp32', 327: '*fp32', 328: '
*fp32', 329: '*fp32', 330: '*fp32', 331: '*fp32', 332: '*fp32', 333: '*fp32', 334: '*fp32', 335: '*fp32', 336: '*fp32', 337: '*fp32', 338: '*fp32', 339: '*fp32', 340: '*fp32', 341: '*fp32', 342: '*fp32', 343: '*fp32', 344: '*fp32', 345: '*fp32', 346: '*fp32', 347: '*fp32', 348: '*f
p32', 349: '*fp32', 350: '*fp32', 351: '*fp32', 352: '*fp32', 353: '*fp32', 354: '*fp32', 355: '*fp32', 356: '*fp32', 357: '*fp32', 358: '*fp32', 359: '*fp32', 360: '*fp32', 361: '*fp32', 362: '*fp32', 363: '*fp32', 364: '*fp32', 365: '*fp32', 366: '*fp32', 367: '*fp32', 368: '*fp3
2', 369: '*fp32', 370: '*fp32', 371: '*fp32', 372: '*fp32', 373: '*fp32', 374: '*fp32', 375: '*fp32', 376: '*fp32', 377: '*fp32', 378: '*fp32', 379: '*fp32', 380: '*fp32', 381: '*fp32', 382: '*fp32', 383: '*fp32', 384: '*fp32', 385: '*fp32', 386: '*fp32', 387: '*fp32', 388: '*fp32'
, 389: '*fp32', 390: '*fp32', 391: '*fp32', 392: '*fp32', 393: '*fp32', 394: '*fp32', 395: '*fp32', 396: '*fp32', 397: '*fp32', 398: '*fp32', 399: '*fp32', 400: '*fp32', 401: '*fp32', 402: 'i32', 403: 'i32'}, 'device': 0, 'constants': {}, 'mutated_arg_names': ['in_out_ptr0', 'in_ou
t_ptr1', 'in_out_ptr2'], 'configs': [instance_descriptor(divisible_by_16=(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54
, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 
120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 17
6, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232,
 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 2
89, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345
, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 
402, 403), equal_to_1=())]}                                                                                                                  
)                                                                                                                                            
@triton.jit                                                                                                                                  
def triton_(in_out_ptr0, in_out_ptr1, in_out_ptr2, in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, in_ptr5, in_ptr6, in_ptr7, in_ptr8, in_ptr9, in_ptr10, in_ptr11, in_ptr12, in_ptr13, in_ptr14, in_ptr15, in_ptr16, in_ptr17, in_ptr18, in_ptr19, in_ptr20, in_ptr21, in_ptr22, in_ptr23, i
n_ptr24, in_ptr25, in_ptr26, in_ptr27, in_ptr28, in_ptr29, in_ptr30, in_ptr31, in_ptr32, in_ptr33, in_ptr34, in_ptr35, in_ptr36, in_ptr37, in_ptr38, in_ptr39, in_ptr40, in_ptr41, in_ptr42, in_ptr43, in_ptr44, in_ptr45, in_ptr46, in_ptr47, in_ptr48, in_ptr49, in_ptr50, in_ptr51, in_
ptr52, in_ptr53, in_ptr54, in_ptr55, in_ptr56, in_ptr57, in_ptr58, in_ptr59, in_ptr60, in_ptr61, in_ptr62, in_ptr63, in_ptr64, in_ptr65, in_ptr66, in_ptr67, in_ptr68, in_ptr69, in_ptr70, in_ptr71, in_ptr72, in_ptr73, in_ptr74, in_ptr75, in_ptr76, in_ptr77, in_ptr78, in_ptr79, in_pt
r80, in_ptr81, in_ptr82, in_ptr83, in_ptr84, in_ptr85, in_ptr86, in_ptr87, in_ptr88, in_ptr89, in_ptr90, in_ptr91, in_ptr92, in_ptr93, in_ptr94, in_ptr95, in_ptr96, in_ptr97, in_ptr98, in_ptr99, in_ptr100, in_ptr101, in_ptr102, in_ptr103, in_ptr104, in_ptr105, in_ptr106, in_ptr107,
 in_ptr108, in_ptr109, in_ptr110, in_ptr111, in_ptr112, in_ptr113, in_ptr114, in_ptr115, in_ptr116, in_ptr117, in_ptr118, in_ptr119, in_ptr120, in_ptr121, in_ptr122, in_ptr123, in_ptr124, in_ptr125, in_ptr126, in_ptr127, in_ptr128, in_ptr129, in_ptr130, in_ptr131, in_ptr132, in_ptr
133, in_ptr134, in_ptr135, in_ptr136, in_ptr137, in_ptr138, in_ptr139, in_ptr140, in_ptr141, in_ptr142, in_ptr143, in_ptr144, in_ptr145, in_ptr146, in_ptr147, in_ptr148, in_ptr149, in_ptr150, in_ptr151, in_ptr152, in_ptr153, in_ptr154, in_ptr155, in_ptr156, in_ptr157, in_ptr158, in
_ptr159, in_ptr160, in_ptr161, in_ptr162, in_ptr163, in_ptr164, in_ptr165, in_ptr166, in_ptr167, in_ptr168, in_ptr169, in_ptr170, in_ptr171, in_ptr172, in_ptr173, in_ptr174, in_ptr175, in_ptr176, in_ptr177, in_ptr178, in_ptr179, in_ptr180, in_ptr181, in_ptr182, in_ptr183, in_ptr184
, in_ptr185, in_ptr186, in_ptr187, in_ptr188, in_ptr189, in_ptr190, in_ptr191, in_ptr192, in_ptr193, in_ptr194, in_ptr195, in_ptr196, in_ptr197, in_ptr198, in_ptr199, in_ptr200, in_ptr201, in_ptr202, in_ptr203, in_ptr204, in_ptr205, in_ptr206, in_ptr207, in_ptr208, in_ptr209, in_pt
r210, in_ptr211, in_ptr212, in_ptr213, in_ptr214, in_ptr215, in_ptr216, in_ptr217, in_ptr218, in_ptr219, in_ptr220, in_ptr221, in_ptr222, in_ptr223, in_ptr224, in_ptr225, in_ptr226, in_ptr227, in_ptr228, in_ptr229, in_ptr230, in_ptr231, in_ptr232, in_ptr233, in_ptr234, in_ptr235, i
n_ptr236, in_ptr237, in_ptr238, in_ptr239, in_ptr240, in_ptr241, in_ptr242, in_ptr243, in_ptr244, in_ptr245, in_ptr246, in_ptr247, in_ptr248, in_ptr249, in_ptr250, in_ptr251, in_ptr252, in_ptr253, in_ptr254, in_ptr255, in_ptr256, in_ptr257, in_ptr258, in_ptr259, in_ptr260, in_ptr26
1, in_ptr262, in_ptr263, in_ptr264, in_ptr265, in_ptr266, in_ptr267, in_ptr268, in_ptr269, in_ptr270, in_ptr271, in_ptr272, in_ptr273, in_ptr274, in_ptr275, in_ptr276, in_ptr277, in_ptr278, in_ptr279, in_ptr280, in_ptr281, in_ptr282, in_ptr283, in_ptr284, in_ptr285, in_ptr286, in_p
tr287, in_ptr288, in_ptr289, in_ptr290, in_ptr291, in_ptr292, in_ptr293, in_ptr294, in_ptr295, in_ptr296, in_ptr297, in_ptr298, in_ptr299, in_ptr300, in_ptr301, in_ptr302, in_ptr303, in_ptr304, in_ptr305, in_ptr306, in_ptr307, in_ptr308, in_ptr309, in_ptr310, in_ptr311, in_ptr312, 
in_ptr313, in_ptr314, in_ptr315, in_ptr316, in_ptr317, in_ptr318, in_ptr319, in_ptr320, in_ptr321, in_ptr322, in_ptr323, in_ptr324, in_ptr325, in_ptr326, in_ptr327, in_ptr328, in_ptr329, in_ptr330, in_ptr331, in_ptr332, in_ptr333, in_ptr334, in_ptr335, in_ptr336, in_ptr337, in_ptr3
38, in_ptr339, in_ptr340, in_ptr341, in_ptr342, in_ptr343, in_ptr344, in_ptr345, in_ptr346, in_ptr347, in_ptr348, in_ptr349, in_ptr350, in_ptr351, in_ptr352, in_ptr353, in_ptr354, in_ptr355, in_ptr356, in_ptr357, in_ptr358, in_ptr359, in_ptr360, in_ptr361, in_ptr362, in_ptr363, in_
ptr364, in_ptr365, in_ptr366, in_ptr367, in_ptr368, in_ptr369, in_ptr370, in_ptr371, in_ptr372, in_ptr373, in_ptr374, in_ptr375, in_ptr376, in_ptr377, in_ptr378, in_ptr379, in_ptr380, in_ptr381, in_ptr382, in_ptr383, in_ptr384, in_ptr385, in_ptr386, in_ptr387, in_ptr388, in_ptr389,
 in_ptr390, in_ptr391, in_ptr392, in_ptr393, in_ptr394, in_ptr395, in_ptr396, in_ptr397, in_ptr398, xnumel, rnumel, XBLOCK : tl.constexpr, RBLOCK : tl.constexpr):                                                                                                                        
    xnumel = 320                                                                                                                                                                                                                                                                          
    rnumel = 32                                                                                                                                                                                                                                                                           
    xoffset = tl.program_id(0) * XBLOCK                                                                                                                                                                                                                                                   
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]                                                                                                                                                                                                                                      
    xmask = xindex < xnumel                                                                                                                                                                                                                                                               
    rindex = tl.arange(0, RBLOCK)[None, :]
    rmask = rindex < rnumel
    r1 = rindex
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (101120 + x0 + (132160*r1)), rmask & xmask, other=0).to(tl.float32)
    tmp5 = tl.load(in_ptr0 + (103680 + x0 + (132160*r1)), rmask & xmask, other=0).to(tl.float32)
    tmp10 = tl.load(in_ptr0 + (106240 + x0 + (132160*r1)), rmask & xmask, other=0).to(tl.float32)
    tmp15 = tl.load(in_ptr0 + (108800 + x0 + (132160*r1)), rmask & xmask, other=0).to(tl.float32)
  ...
  ...
  ...

It goes on for a few hundred more lines with similar tmp[0-9]* = tl.load(...) lines.

@malfet
Copy link
Contributor

malfet commented Feb 21, 2023

@atalman , @kit1980 can you please investigate what have caused a packaging regressions? (I assume some release related work)

@ipoletaev
Copy link

For whom it might be helpful I was just able to successfully compile a random model on A100 by following

pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu117
pip uninstall pytorch-triton 
pip install --no-deps triton==2.0.0.a2
TRITON_PTXAS_PATH=/usr/bin/ptxas python my_model_compiler.py

@gchanan gchanan added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Feb 21, 2023
@weiwangmeta
Copy link
Contributor

weiwangmeta commented Feb 22, 2023

@atalman , @kit1980 can you please investigate what have caused a packaging regressions? (I assume some release related work)

#95265 upgraded setuptools and the packaging is complete with third_party/cuda files. No need to investigate the regression IMO.

@pcuenca
Copy link
Author

pcuenca commented Feb 22, 2023

@weiwangmeta I uninstalled torch, torchvision, pytorch-triton and numpy and installed the latest nightly. Both the cuda 11.7 and cuda 11.8 wheels fail with this error:

LLVM ERROR: Can't find libdevice at neither /home/pedro/miniconda/envs/hf/lib/python3.9/site-packages/triton/third_party/cuda/lib/libdevice.10.bc nor /tmp/tmpqoukkez6/triton/python/triton/third_party/cuda/lib/libdevice.10.bc

There is no third_party directory inside site-packes/triton.

These are the versions that got installed:

[pip3] numpy==1.24.2
[pip3] pytorch-triton==2.0.0+c8bfe3f548
[pip3] torch==2.0.0.dev20230220+cu117
[pip3] torchvision==0.15.0.dev20230221+cu117

(I'll try later to see if a more recent wheel becomes available)

atalman pushed a commit to atalman/pytorch that referenced this issue Feb 22, 2023
Should fix pytorch#95082
This hash commit is supposed to fix sm_89 issue.
Pull Request resolved: pytorch#95247
Approved by: https://github.com/ngimel, https://github.com/seemethere
weiwangmeta added a commit that referenced this issue Feb 22, 2023
Should fix #95082
This hash commit is supposed to fix sm_89 issue.
Pull Request resolved: #95247
Approved by: https://github.com/ngimel, https://github.com/seemethere

Co-authored-by: Wei Wang <[email protected]>
@weiwangmeta
Copy link
Contributor

weiwangmeta commented Feb 22, 2023

[pip3] pytorch-triton==2.0.0+c8bfe3f548

We are having some nightly build issues (the latest nightly was 2 days ago, so torch does not get updated and keeps calling for the broken wheel).

Please use the three steps in this comment:
#95223 (comment)

Please let us know if this still does not work for you.

@weiwangmeta weiwangmeta added this to the 2.0.0 milestone Feb 22, 2023
@oddlama
Copy link

oddlama commented Feb 23, 2023

Please let us know if this still does not work for you.

Not OP but I had the same issue and your workaround was successful for me. Thanks!

@weiwangmeta
Copy link
Contributor

Please let us know if this still does not work for you.

Not OP but I had the same issue and your workaround was successful for me. Thanks!

We have fixed 2.0.0-rc1 with 2.0.0-rc2, now just the step 1 would work fine too.

pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/test/cu117

@pcuenca
Copy link
Author

pcuenca commented Feb 23, 2023

@weiwangmeta I can confirm the latest RC works fine. Thanks a lot!

@weiwangmeta
Copy link
Contributor

@pcuenca Thanks for the confirmation!

Since you originally tried nightly version, just fyi that the nightly binaries were just available and should work fine as well:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu117 --no-cache-dir

Collecting torch
Downloading https://download.pytorch.org/whl/nightly/cu117/torch-2.0.0.dev20230223%2Bcu117-cp310-cp310-linux_x86_64.whl (1848.1 MB)
Collecting pytorch-triton==2.0.0+d54c04abe2 Downloading https://download.pytorch.org/whl/nightly/pytorch_triton-2.0.0%2Bd54c04abe2-cp310-cp310-linux_x86_64.whl (66.5 MB)

pruthvistony pushed a commit to ROCm/pytorch that referenced this issue May 3, 2023
Should fix pytorch#95082
This hash commit is supposed to fix sm_89 issue.
Pull Request resolved: pytorch#95247
Approved by: https://github.com/ngimel, https://github.com/seemethere

Co-authored-by: Wei Wang <[email protected]>
jhavukainen pushed a commit to kulinseth/pytorch that referenced this issue Mar 15, 2024
Should fix pytorch#95082
This hash commit is supposed to fix sm_89 issue.
Pull Request resolved: pytorch#95247
Approved by: https://github.com/ngimel, https://github.com/seemethere
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: inductor oncall: pt2 triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging a pull request may close this issue.