Skip to content

Pass exception flag through kernel state#367

Closed
jpsamaroo wants to merge 3 commits intomasterfrom
jps/kernel-state
Closed

Pass exception flag through kernel state#367
jpsamaroo wants to merge 3 commits intomasterfrom
jps/kernel-state

Conversation

@jpsamaroo
Copy link
Member

We now use GPUCompiler's kernel state support to pass an AMDGPU.KernelState object as the first argument to all kernels. This object contains an exception flag, which replaces the exception that we would place in a global variable, which allows us to know exactly which kernels threw an exception (instead of making it appear like all kernels of a given type may have thrown an exception).

One unfortunate side effect of adding this new argument is that it disables kernarg buffer sharing across otherwise identical kernel invocations, because now each KernelState object has a unique exception flag. Maybe some kind of dedicated buffer pooling would help here? That would also decrease the newly-added cost of flag allocation in the launch path.

Todo:

  • Pool exception flag buffers
  • Investigate if we can keep kernarg sharing benefits

Copy the occupancy API algorithm from HIP
Add `groupsize=:auto` option to at-roc to automatically choose groupsize
Implement `launch_configuration` API
Base automatically changed from jps/occupancy to master January 30, 2023 20:03
@pxl-th
Copy link
Member

pxl-th commented Jul 7, 2023

Implemented in #423.

@pxl-th pxl-th closed this Jul 7, 2023
@pxl-th pxl-th deleted the jps/kernel-state branch December 2, 2023 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants