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

Revert cleaning cache changes on Windows #3217

Merged
merged 12 commits into from
Jan 24, 2025

Conversation

anmyachev
Copy link
Contributor

@anmyachev anmyachev commented Jan 20, 2025

With unloaded DLL libraries, these changes are no longer necessary. However, two tests that hold a reference to the compiled kernel need to be adjusted - manually clear the cache (inside JITFunction object).

CI:

Blocked on #3251

Extra refs:

@anmyachev anmyachev force-pushed the amyachev/revert-cache-changes branch from 2500f9e to 5f64732 Compare January 23, 2025 21:12
Signed-off-by: Anatoly Myachev <[email protected]>
Signed-off-by: Anatoly Myachev <[email protected]>
Signed-off-by: Anatoly Myachev <[email protected]>
Signed-off-by: Anatoly Myachev <[email protected]>
@anmyachev anmyachev changed the title DEBUG: revert cleaning cache changes on Windows Revert cleaning cache changes on Windows Jan 24, 2025
@anmyachev anmyachev marked this pull request as ready for review January 24, 2025 16:53
@whitneywhtsang whitneywhtsang merged commit 91692c3 into main Jan 24, 2025
8 checks passed
@whitneywhtsang whitneywhtsang deleted the amyachev/revert-cache-changes branch January 24, 2025 22:32
if os.name == "nt":
os.remove(temp_path)
else:
raise
Copy link
Contributor

Choose a reason for hiding this comment

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

This change was necessary if multiple processes compile the same kernel and try to put files (not only .pyd) into the same cache directory. It happens when you run tests with xdist and all workers use the same triton cache directory. A user program might behave in the same way too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right, thank you!

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.

[Windows][Pytorch Upstream] The pyd files comes from Triton compile_module_from_src can not be cleaned.
4 participants