Skip to content

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
@anmyachev anmyachev merged commit bb38a43 into main Jan 2, 2025
7 checks passed
@anmyachev anmyachev deleted the amyachev/bench-dup3 branch January 2, 2025 12: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

3 participants