Git Product home page Git Product logo

Comments (7)

dvrogozh avatar dvrogozh commented on June 20, 2024 1

I opened intel/torch-xpu-ops#318 with the implementation I propose (which is - always warn on cpu fallback :) ). Let's continue discussion in the PR.

from pytorch.

dvrogozh avatar dvrogozh commented on June 20, 2024

Also filed intel/torch-xpu-ops#262

from pytorch.

dvrogozh avatar dvrogozh commented on June 20, 2024

Note: I am fine if "explicit" fallback will be muted by default, but I really need a way to be able to track it.

I still want to comment on that. I personally will be fine with muted logs on fallback by default because I know that currently there are a number of operations not yet implemented in XPU. However, I argue that for other people who just spotted and want to try XPU backend and having limited knowledge on it - for these people such muted behavior might be a problem. They will spot immediately that XPU backend significantly underperforms, sometimes even compared to CPU, and they won't have any obvious reason at hand why. Log messages with warnings that CPU fallback is happening were quote handy here - they were setting correct impression that currently XPU backend might underperform.

My recommendation is to always print a debug message that CPU fallback is happening regardless whether it's explicit (whatever this means) or implicit.

from pytorch.

fengyuan14 avatar fengyuan14 commented on June 20, 2024

Got your requirement. In my understanding, the log is not informative for DL workload customers. It should be a debugging requirement.

As to release build, we would keep existing implementation. I think, we could add the feature in debug build.

from pytorch.

fengyuan14 avatar fengyuan14 commented on June 20, 2024

@EikanWang Please comment.

from pytorch.

dvrogozh avatar dvrogozh commented on June 20, 2024

As to release build, we would keep existing implementation. I think, we could add the feature in debug build.

Can you, please, have this feature controlled by environment variable, let's say same as before - PYTORCH_DEBUG_XPU_FALLBACK=1? In this case you can have it disabled by default for Release build and enabled by default for Debug build. Then, end user can decide whether he want it enabled for Release build or disabled for debug via environment variable.

from pytorch.

EikanWang avatar EikanWang commented on June 20, 2024

We will close the issue as long as the PR is landed.

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.