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

Apply temp. patch to Triton code to resolve conflicting cache dirs in TP case #34

Merged
merged 2 commits into from
May 28, 2024

Conversation

tdoublep
Copy link
Member

We are seeing Mixtral pods with TP>1 failing with errors like:

FileNotFoundError: [Errno 2] No such file or directory: '/home/vllm/.triton/cache/c926ad2ef143810ed738a313c473c7b2/fused_moe_kernel.cubin.tmp.pid_72_945989'

It seems like there is some conflict in the Triton cache directories when using multi-processing. This has actually been fixed upstream in Triton, but the fix hasn't made it into Triton v2.3.0 which is what vLLM is currently using.

This change essentially applies same fix that has made it into Triton main branch inside our container.

… TP case.

Signed-off-by: Thomas Parnell <tpa@zurich.ibm.com>
Signed-off-by: Thomas Parnell <tpa@zurich.ibm.com>
@tdoublep tdoublep requested review from njhill and joerunde May 28, 2024 12:35
Copy link
Member

@njhill njhill left a comment

Choose a reason for hiding this comment

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

Very nice thank you @tdoublep!

@njhill njhill merged commit 4af59d3 into main May 28, 2024
14 checks passed
@njhill njhill deleted the tpa-triton-cachefix branch May 28, 2024 15:32
joerunde added a commit that referenced this pull request Jun 3, 2024
…ch instead. (#35)

I tested the previous fix for the Triton cache collision issue (see:
#34) and it didn't work.

I now see errors like:
```
FileNotFoundError: [Errno 2] No such file or directory: '/home/vllm/.triton/cache/1feb415f3280ca46eea8c4407a58c23e/fused_moe_kernel.json.tmp.pid_72_c0a0033e-6147-4520-ae3a-3847d02598f8'
```
which now shows the `uuid` instead of a random integer, but problem
remains.

This PR implements a different workaround, proposed by @cyang49, that
tells Triton to use a custom cache manager which assigns a different
directory based on the process id.

This time I have tested it and it seems to work.

---------

Signed-off-by: Thomas Parnell <tpa@zurich.ibm.com>
Signed-off-by: Nick Hill <nickhill@us.ibm.com>
Signed-off-by: Joe Runde <joe@joerun.de>
Co-authored-by: Chih-Chieh-Yang <chih.chieh.yang@ibm.com>
Co-authored-by: Joe Runde <joseph.runde@ibm.com>
Co-authored-by: Nick Hill <nickhill@us.ibm.com>
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.

2 participants