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

Cleaning up GPU executable flatbuffers prior to a larger reworking. #18208

Merged
merged 6 commits into from
Aug 14, 2024

Conversation

benvanik
Copy link
Collaborator

Besides some renaming the major cleanup here is centralizing debug info at the HAL level and adding some utilities for producing/consuming it. Each target may also include additional target-specific debug info (like source maps in WGSL, etc) but the information useful for uniform tracing across targets is now shared.

Future changes will rip apart the GPU flatbuffers to store things per export instead of many arrays and allow for easier addition of export information by modifying the export tables.

This is a breaking change (barely) and is staged into a branch until all changes are complete and a global HAL version bump can happen as part of the dispatch2 work in #18154.

Progress on #18154.

(tables have Def, structs don't)
It's a HAL executable and will contain multiple kernel libraries.
@benvanik benvanik added hal/vulkan Runtime Vulkan GPU HAL backend hal/metal Runtime Apple Metal HAL backend hal/cuda Runtime CUDA HAL backend hal/webgpu Runtime WebGPU HAL backend hal/hip Runtime HIP HAL backend labels Aug 13, 2024
@benvanik benvanik force-pushed the users/benvanik/gpu-fb-cleanup branch from 9de1874 to a1ba867 Compare August 13, 2024 21:15
Copy link
Member

@ScottTodd ScottTodd left a comment

Choose a reason for hiding this comment

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

Batching breaking changes together SGTM. Thanks for the incremental cleanup.

runtime/src/iree/schemas/executable_debug_info.fbs Outdated Show resolved Hide resolved
runtime/src/iree/schemas/hip_executable_def.fbs Outdated Show resolved Hide resolved
@benvanik benvanik force-pushed the users/benvanik/gpu-fb-cleanup branch from a1ba867 to edc6428 Compare August 14, 2024 00:29
This also adds source file publishing to all GPU targets. Basic support
for export-specific debug info is added but switching targets to use it
is left to a future change.
@benvanik benvanik force-pushed the users/benvanik/gpu-fb-cleanup branch from edc6428 to 81ad118 Compare August 14, 2024 00:37
I don't expect us to have the same flatbuffers for different HAL
implementations and do expect us to have alternative file formats for
the same HAL implementation.
@benvanik benvanik force-pushed the users/benvanik/gpu-fb-cleanup branch from a22f9b6 to ab732ab Compare August 14, 2024 01:00
@benvanik benvanik marked this pull request as ready for review August 14, 2024 01:09
@benvanik benvanik requested review from ScottTodd and removed request for kuhar and nithinsubbiah August 14, 2024 01:09
@benvanik benvanik merged commit f0afdd7 into shared/dispatch2 Aug 14, 2024
45 checks passed
@benvanik benvanik deleted the users/benvanik/gpu-fb-cleanup branch August 14, 2024 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hal/cuda Runtime CUDA HAL backend hal/hip Runtime HIP HAL backend hal/metal Runtime Apple Metal HAL backend hal/vulkan Runtime Vulkan GPU HAL backend hal/webgpu Runtime WebGPU HAL backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants