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

On Windows use Triton cache dir per pytest worker #3041

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

Conversation

pbchekin
Copy link
Contributor

Fixes #2777.

worker_id = os.getenv("PYTEST_XDIST_WORKER")
# On Windows, use a dedicated Triton cache per pytest worker to avoid PermissionError.
if os.name == "nt" and worker_id:
os.environ["TRITON_CACHE_DIR"] = tempfile.mkdtemp(prefix="triton-")
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 could use worker_id as a unique identifier in the name of cache directory.

I could, but worker_id won't help to debug potentials issues, since we still need to know unique/random suffix.

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.

[WIN] Parallel tests execution fails because of locked files
1 participant