This is an archive of the discontinued LLVM Phabricator instance.

mlir/lib/Dialect/GPU/Transforms: improve context management in SerializeToCubin
ClosedPublic

Authored by rohany on Sep 8 2023, 9:57 AM.

Details

Summary

This commit adjusts the CUDA context management in the SerializeToCubin pass.
In particular, it uses the device 0 primary context instead of creating a new
CUDA context on each invocation of SerializeToCubin. This yields very large
improvements in compile time, especially if an application (like a JIT compiler)
is calling SerializeToCubin repeatedly.

Diff Detail

Event Timeline

rohany created this revision.Sep 8 2023, 9:57 AM
Herald added a project: Restricted Project. · View Herald Transcript
rohany requested review of this revision.Sep 8 2023, 9:57 AM
rohany added a comment.Sep 8 2023, 9:59 AM

Sorry, didn't see the github migration. Will move this to github.

This revision was not accepted when it landed; it landed in state Needs Review.Oct 20 2023, 10:35 AM
This revision was automatically updated to reflect the committed changes.