Coder Social home page Coder Social logo

Comments (6)

oulgen avatar oulgen commented on June 18, 2024

"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.

jeromeku avatar jeromeku commented on June 18, 2024

yes, in the minimal repro I provided, the code first runs the kernel without compile first. Only errors out when compiling.

from pytorch.

oulgen avatar oulgen commented on June 18, 2024

@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.

jeromeku avatar jeromeku commented on June 18, 2024

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.

oulgen avatar oulgen commented on June 18, 2024

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.

arthursunbao avatar arthursunbao commented on June 18, 2024

I have the same issue and will update more details later

from pytorch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.