[Comgr] Materialize header inputs in the VFS instead of on disk - #3842
Draft
chinmaydd wants to merge 1 commit into
Draft
[Comgr] Materialize header inputs in the VFS instead of on disk#3842chinmaydd wants to merge 1 commit into
chinmaydd wants to merge 1 commit into
Conversation
This was referenced Aug 10, 2026
Includes, precompiled headers and opencl-c-base.h were written to real temp files on every compile even though the in-memory VFS is enabled by default. These paths are read back only through Clang's FileManager, which is built on the driver's OverlayFS, so they can be served from memory. Source, bitcode and link inputs stay on disk: cc1as, lld, the offload bundler and the command cache's input hashing all read the real filesystem. Also stop getFilePath running fs::create_directories on every path it builds; only the three paths the in-process driver writes need it, and outputToFile already creates the parent for the paths Comgr writes. And take ownership of the output buffer in inputFromFile rather than malloc+memcpy every artifact a second time. 60 OpenCL preprocess actions with 24 8KB includes: 1521 ms -> ~1400 ms. Co-authored-by: Cursor <cursoragent@cursor.com>
chinmaydd
force-pushed
the
amd/dev/chdeshpa/comgr-vfs-user-io
branch
from
August 10, 2026 17:50
1ba2154 to
2e48dfc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is third in a series of PRs that improves Comgr.
Includes, precompiled headers and opencl-c-base.h were written to real temp files on every compile even though the in-memory VFS is enabled by default. These paths are read back only through Clang's FileManager, which is built on the driver's OverlayFS, so they can be served from memory. Source, bitcode and link inputs stay on disk: cc1as, lld, the offload bundler and the command cache's input hashing all read the real filesystem.
Also stop
getFilePathrunningfs::create_directorieson every path it builds; only the three paths the in-process driver writes need it, andoutputToFilealready creates the parent for the paths Comgr writes. And take ownership of the output buffer ininputFromFilerather than malloc+memcpy every artifact a second time.60 OpenCL preprocess actions with 24 8KB includes: 1521 ms -> ~1400 ms.
[1/3] <- #3840
[2/3] <- #3841
[3/3] <- you are here