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

Add options to save and load pipeline caches #1276

Merged
merged 5 commits into from
Dec 11, 2024

Conversation

marius-pelegrin-arm
Copy link
Contributor

Add three options --save-pipeline-cache, --load-pipeline-cache and --add-new-pipeline-caches to manually handle pipeline cache creation/loading instead of using the ones saved in the capture file.

This is useful when pipeline creation is slow on the target system. You can generate the cache once then run the trace multiple times, or generate it on a faster device type with the same GPU and driver.

When using --save-pipeline-cache the contents of the pipeline caches are written to the specified file just before their destruction, and just before the destruction of the last bound pipeline for caches created by --create-new-pipeline-cache, or at the end of the program if no destruction occurs before.

When using --load-pipeline-cache the contents of the pipeline caches are loaded just before their creation, and just before the creation of the pipeline for caches created by
--create-new-pipeline-cache.

If set, allows gfxreconstruct to create new vkPipelineCache objects when it encounters a pipeline created without cache. This option can be used in coordination with --save-pipeline-cache and --load-pipeline-cache.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 50146.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3264 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3264 passed.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 50662.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3274 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3274 passed.

@bradgrantham-lunarg bradgrantham-lunarg added the P2 A high-priority code maintenance issue or a functional problem that is recoverable or not a crash. label Oct 30, 2023
@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 122880.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 122884.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3700 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3700 passed.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 215183.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 4400 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 215196.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 4401 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 4401 passed.

@charles-lunarg charles-lunarg force-pushed the replay-pipeline-caches branch from 91a9e0d to c7adb88 Compare July 25, 2024 05:30
@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 223544.

Copy link
Contributor

@charles-lunarg charles-lunarg left a comment

Choose a reason for hiding this comment

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

Seems to be a useful ability to change out the pipeline cache without recapturing a whole new trace - pipeline caches are in a way transient anyhow.
I do have a question about logging - I found it difficult to know if/when things where happening without inserting "saving pipeline cache" type debug messages. If I found it useful while validating the feature, I would expect others to find it useful in the log. I did not include the messages I wrote while investigating the PR, (rather just rebased on dev).

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 4456 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 4456 passed.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 270377.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 4944 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 310207.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 5398 running.

Copy link
Contributor

@MarkY-LunarG MarkY-LunarG left a comment

Choose a reason for hiding this comment

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

A few questions.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 5398 passed.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 310324.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 5401 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 5401 failed.

@fabian-lunarg fabian-lunarg force-pushed the replay-pipeline-caches branch from d980476 to cd284aa Compare December 2, 2024 09:15
@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 314518.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 5471 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 5471 passed.

marius-pelegrin-arm and others added 5 commits December 3, 2024 09:46
Add three options `--save-pipeline-cache`, `--load-pipeline-cache`
and `--add-new-pipeline-caches` to manually handle pipeline cache
creation/loading instead of using the ones saved in the capture file.

This is useful when pipeline creation is slow on the target system.
You can generate the cache once then run the trace multiple times,
or generate it on a faster device type with the same GPU and driver.

When using `--save-pipeline-cache` the contents of the pipeline
caches are written to the specified file just before their
destruction, and just before the destruction of the last bound
pipeline for caches created by `--create-new-pipeline-cache`, or at
the end of the program if no destruction occurs before.

When using `--load-pipeline-cache` the contents of the pipeline
caches are loaded just before their creation, and just before the
creation of the pipeline for caches created by
`--create-new-pipeline-cache`.

If set, allows gfxreconstruct to create new vkPipelineCache objects
when it encounters a pipeline created without cache. This option
can be used in coordination with `--save-pipeline-cache` and
`--load-pipeline-cache`.

Change-Id: I40667416efe4c88033c386f6ec5fd53a86dd58ca
@fabian-lunarg fabian-lunarg force-pushed the replay-pipeline-caches branch from cd284aa to c91bd10 Compare December 3, 2024 09:03
@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 315493.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 5485 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 5485 passed.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 321960.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 5534 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 5534 passed.

@fabian-lunarg fabian-lunarg merged commit 4428ab3 into LunarG:dev Dec 11, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 A high-priority code maintenance issue or a functional problem that is recoverable or not a crash.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants