Comments (6)
"No module named 'nvi'" means that there's a version mismatch. Are you able to run your triton code in eager mode (without torch.compile)?
from pytorch.
yes, in the minimal repro I provided, the code first runs the kernel without compile first. Only errors out when compiling.
from pytorch.
@jeromeku looking at your relevant libraries, i see you have both triton and pytorch-triton installed, could you pip uninstall triton so that there's only one triton?
from pytorch.
I tried to do that, but uninstalling triton
breaks my installation. When I try to import triton.ops
, I get:
"No module named 'triton.ops'"
from pytorch.
That's because ops is likely not defined in the __init__.py
. If you add from triton import ops
and then change triton.ops.matmul
to ops.matmul
, it makes progress, but then it runs into another issue in triton's autotuner.
import triton
import torch
from triton import ops
def test_triton_matmul_compile():
dtype = torch.float16
A = torch.randn(4096, 4096, dtype=dtype, device="cuda")
B = torch.randn(4096, 4096, dtype=dtype, device="cuda")
acc_dtype = None
input_precision = "ieee"
fp8_fast_accum = False
output_dtype = None
out = ops.matmul(A, B, acc_dtype, input_precision, fp8_fast_accum, output_dtype)
#triton_compiled = torch.compile(ops.matmul)
#compiled_out = triton_compiled(A, B, acc_dtype, input_precision, fp8_fast_accum, output_dtype)
if __name__ == "__main__":
test_triton_matmul_compile()
notice that there's no torch compile anymore, still runs into the same autotuner issue. I suspect the triton package that ships with torch is not compatible with torch.ops.matmul.
I'll update the issue, for proper triage.
from pytorch.
I have the same issue and will update more details later
from pytorch.
Related Issues (20)
- [dynamo] Detect functionalized functions with HOPs with mutations at tracing time HOT 1
- UNSTABLE inductor / linux-jammy-cpu-py3.8-gcc11-inductor / test (inductor_torchbench_cpu_smoketest_perf) HOT 2
- Tensor-likes are not close for test_grad_scaling_autocast_fused_optimizers Adam_cuda_float32 and SGD_cuda_float32
- Add ability to pass `MAP_NORESERVE` to`mmap(2)` call in `torch.serialization.set_default_mmap_options`
- xpu: implement grid_sample op for XPU (fallback to CPU not possible for fp16 and bf16) HOT 3
- [dynamo] Trace through invalid bool tensor operations properly HOT 7
- xpu: can't build XPU backend without sourcing oneAPI environment variables (/opt/intel/oneapi/setvars.sh)
- `indices_or_sections` parameter of `dsplit()` doesn't work while `sections` or `indices` parameter works
- `indices_or_sections` parameter of `tensor_split()` doesn't work while `sections`, `indices` or `tensor_indices_or_sections` parameter works
- [CI] Download android and ios dependencies from pip instead of conda
- Add Ability to Skip Hipification When Building CUDA Extension HOT 5
- `indices_or_sections` parameter of `vsplit()` doesn't work while `sections` or `indices` parameter works
- `indices_or_sections` parameter of `hsplit()` doesn't work while `sections` or `indices` parameter works
- Make grid_sample a bit more intuitive to use HOT 1
- [dynamo] Trace through chunk jacrev error properly.
- [dynamo] Fake tensor impl for torch.addr not checking for errors HOT 2
- [dynamo] Fake tensor impl for Tensor.add_ not checking for errors HOT 3
- MultiheadAttention returns NaNs when need_weights=False for long sequences with a mask that ignores old tokens HOT 1
- Choose better configs for `tuned_mixed_mm`
- T5 -small Dynamic quantization in graviton3 HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytorch.