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

DxilValidation: TGSM size check should be per-entry in lib target #6637

Open
tex3d opened this issue May 20, 2024 · 0 comments
Open

DxilValidation: TGSM size check should be per-entry in lib target #6637

tex3d opened this issue May 20, 2024 · 0 comments
Labels
bug Bug, regression, crash validation Related to validation or signing
Milestone

Comments

@tex3d
Copy link
Contributor

tex3d commented May 20, 2024

Description
In DxilValidation.cpp, a check for the total size of TGSM (Thread Group Shared Memory) used counts all groupshared global variables in the module. This is not valid for a library with multiple entry points, when each of which only uses a subset of the groupshared globals. The correct per-entry groupshared usage is collected into the RDAT part, but the independent calculation in the validator is left-over from enforcing the maximum on compute targets at the module level instead.

This mainly impacts Work Graphs (node shader) for now, since that's the only runtime-supported compute entry in a DXIL library.

Steps to Reproduce
Repro here:
https://godbolt.org/z/z88esxr1s

Individually, these two entries are valid, but together in a lib, they produce a validation error due to the summed groupshared memory sizes.

Actual Behavior

error: validation errors
<source>:35: error: Total Thread Group Shared Memory storage is 65536, exceeded 32768.
Validation failed.

Environment

  • DXC version: 1.8.2403
  • Host Operating System: any
@tex3d tex3d added bug Bug, regression, crash needs-triage Awaiting triage labels May 20, 2024
@damyanp damyanp added this to the Backlog milestone May 20, 2024
@damyanp damyanp added validation Related to validation or signing and removed needs-triage Awaiting triage labels May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug, regression, crash validation Related to validation or signing
Projects
Status: Triaged
Development

No branches or pull requests

2 participants