Skip to content

Conversation

@chellmuth
Copy link
Collaborator

Description

The ptx cache key introduced in #1938 didn't include a shader's entry layer name in its cache key. The direct callable function generated during llvm construction includes this layer name, so we could get false positive cache hits when two identical networks with matching group names had different entry layer names. The end result is an optix compilation error. This PR extends the cache key to handle this scenario.

Tests

Checklist:

  • I have read the contribution guidelines.
  • I have updated the documentation, if applicable.
  • I have ensured that the change is tested somewhere in the testsuite (adding new test cases if necessary).
  • My code follows the prevailing code style of this project. If I haven't
    already run clang-format v17 before submitting, I definitely will look at
    the CI test that runs clang-format and fix anything that it highlights as
    being nonconforming.

@lgritz
Copy link
Collaborator

lgritz commented Mar 7, 2025

I don't think the CI failures here are related to this PR -- they appear to be (perhaps momentary?) failures to download the Intel compilers. I'm rerunning the failed tests now to see if it's fixed.

Copy link
Collaborator

@lgritz lgritz left a comment

Choose a reason for hiding this comment

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

LGTM

@lgritz lgritz merged commit 73e4209 into AcademySoftwareFoundation:main Mar 7, 2025
26 checks passed
lgritz pushed a commit to lgritz/OpenShadingLanguage that referenced this pull request Mar 7, 2025
…tion#1954)

The ptx cache key introduced in AcademySoftwareFoundation#1938 didn't include a shader's entry layer name in its cache key. The direct callable function generated during llvm construction includes this layer name, so we could get false positive cache hits when two identical networks with matching group names had different entry layer names. The end result is an optix compilation error. This PR extends the cache key to handle this scenario.

Signed-off-by: Chris Hellmuth <[email protected]>
lgritz pushed a commit that referenced this pull request Mar 7, 2025
The ptx cache key introduced in #1938 didn't include a shader's entry layer name in its cache key. The direct callable function generated during llvm construction includes this layer name, so we could get false positive cache hits when two identical networks with matching group names had different entry layer names. The end result is an optix compilation error. This PR extends the cache key to handle this scenario.

Signed-off-by: Chris Hellmuth <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants