Skip to content
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

Reuse kernels launcher from main intel driver for benchmarks #3070

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

anmyachev
Copy link
Contributor

@anmyachev anmyachev commented Dec 26, 2024

Closes #2540

if self._build_with_pytorch_dep is False:
self._build_with_pytorch_dep = True
self.libraries += ['torch']
return os.environ.get("INJECT_PYTORCH", "False") == "True"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working through environment variables is more stable, since with the previous approach this module (driver.py) is loaded by Python at least twice (somewhere in Triton driver there is a manual module loading), which recreates CompilationHelper instance and removes the effect of calling inject_pytorch_dep method. This issue only occurs when trying to reuse make_launcher function, so the previous version still works correctly.

@anmyachev anmyachev marked this pull request as ready for review December 26, 2024 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unify XPU launchers
2 participants