Skip to content

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.

5 participants