Giter Club home page Giter Club logo

Comments (4)

ptillet avatar ptillet commented on July 22, 2024

Hi Tom!

After having looked at it, this is actually not strictly a bug. The backward pass modifies neg_logprobs in-place, so the auto-tuner will keep modifying the buffer over and over again as it tries different configurations to run. If you set num_warps=[2] or num_warps=[4], it will also work. I would suggest you disable auto-tuning for now. We should leave this issue open until a solution is implemented

Probably the solution will look something like:
triton.kernel( ... , autotune_clone = 'neg_logprobs'), then the auto-tuner will just clone automatically neg_logprobs before running.

I hope at some point pointers modified in-place can be determined automatically from static analysis.

from triton.

ptillet avatar ptillet commented on July 22, 2024

This is an old issue but still not addressed actually. I remember having a patch ready at some point so I'll dig in to see if I can find it somewhere. Now that the JIT API is back to taking pure torch.tensor, it shouldn't be too hard to clone them before the auto-tuner runs.

from triton.

nottombrown avatar nottombrown commented on July 22, 2024

Awesome!

from triton.

ptillet avatar ptillet commented on July 22, 2024

Should have been fixed in #205 . Now you can provide reset_to_zero(list_of_arg_names) to the auto-tuner, and it will reset all arguments of provided name to zero before each benchmark run. Not ideal, but should fix this issue

from triton.

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.