Skip to content

Add YAML-driven acceleration structure definitions for .test files#1214

Merged
MarijnS95 merged 1 commit into
llvm:mainfrom
Traverse-Research:cherry-pick-yaml-as-defs
May 29, 2026
Merged

Add YAML-driven acceleration structure definitions for .test files#1214
MarijnS95 merged 1 commit into
llvm:mainfrom
Traverse-Research:cherry-pick-yaml-as-defs

Conversation

@MarijnS95

@MarijnS95 MarijnS95 commented May 21, 2026

Copy link
Copy Markdown
Collaborator

For #1158

Summary

  • Add AccelerationStructure to ResourceKind and introduce pipeline structs (TriangleGeometry, AABBGeometry, BLASDesc, InstanceDesc, TLASDesc) in include/Support/Pipeline.h with YAML parsing and name-based resolution for buffer/BLAS/TLAS references in lib/Support/Pipeline.cpp.
  • Add a DX RaytracingTier capability enum (NotSupported/1.0/1.1) wired through DXFeatures.def/.h/.cpp so the DX device can report a raytracing tier.
  • Surface an acceleration-structure lit feature in test/lit.cfg.py, derived per-backend from DX RaytracingTier != NotSupported, Metal supportsRaytracing, and Vulkan VK_KHR_acceleration_structure.
  • Add AccelerationStructure cases to the resource-kind switch statements in the DX, Metal, and Vulkan device backends (no execution yet — just enum coverage).
  • Add three placeholder InlineRT test files (triangle-setup, indexed-triangle-setup, multi-instance) exercising the new YAML format, gated behind REQUIRES: acceleration-structure and marked XFAIL: * because backend execution of acceleration structures is not implemented yet.

This PR only introduces the YAML surface area, parsing, and capability detection — the runtime side that actually builds/binds acceleration structures is intentionally out of scope and will follow.

Test plan

  • check-hlsl-offload passes on DX, Metal, and Vulkan with the three new tests reported as XFAIL (or skipped where acceleration-structure isn't available).
  • Existing tests are unaffected on all three backends.

@MarijnS95 MarijnS95 force-pushed the cherry-pick-yaml-as-defs branch from 25f1db9 to 9bc46ea Compare May 21, 2026 13:20
@manon-traverse

This comment was marked as resolved.

@MarijnS95 MarijnS95 force-pushed the cherry-pick-yaml-as-defs branch 3 times, most recently from 5327bdc to fe1a6e6 Compare May 21, 2026 20:31
@MarijnS95 MarijnS95 requested a review from manon-traverse May 21, 2026 21:31
@MarijnS95 MarijnS95 force-pushed the cherry-pick-yaml-as-defs branch from fe1a6e6 to a60120c Compare May 22, 2026 12:12
Comment thread include/Support/Pipeline.h Outdated
Comment thread include/Support/Pipeline.h Outdated
Comment thread test/Feature/InlineRT/indexed-triangle-setup.test Outdated
@MarijnS95 MarijnS95 force-pushed the cherry-pick-yaml-as-defs branch from a60120c to 8d00c38 Compare May 26, 2026 08:04
@MarijnS95 MarijnS95 requested a review from manon-traverse May 26, 2026 08:04
@MarijnS95 MarijnS95 force-pushed the cherry-pick-yaml-as-defs branch 2 times, most recently from e2af1c3 to a7d8a28 Compare May 27, 2026 12:55
@MarijnS95 MarijnS95 force-pushed the cherry-pick-yaml-as-defs branch 3 times, most recently from de55a15 to c075d64 Compare May 28, 2026 16:26

@bogner bogner left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

My comments on the one test apply to all three, but otherwise this LGTM.

Comment thread test/Feature/InlineRT/indexed-triangle-setup.test Outdated
Comment on lines +82 to +83
# CHECK: Name: Output
# CHECK: Data: [ 1 ]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why are we doing both a Results block and FileCheck? The FileCheck part is redundant.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Interesting. Many other tests still seem to use a stdout-readback + FileCheck/CHECK, and even though FileCheck is more featureful (regex, CHECK-NEXT/NOT, ordering assertions on log output) most of those are also "just compare a buffer" and could equally well use a direct buffer comparison through Results:. Any clue why they don't — historical inertia from before Results: existed, or is there a deliberate reason I'm missing? Happy to do a consistency pass in a separate PR if you'd like them migrated.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's just historical inertia from before Results existed. If you feel like doing a consistency pass I wouldn't say no to it :)

@MarijnS95 MarijnS95 force-pushed the cherry-pick-yaml-as-defs branch from c075d64 to acf1e6e Compare May 28, 2026 21:46
@MarijnS95 MarijnS95 requested a review from bogner May 28, 2026 21:46
@MarijnS95 MarijnS95 force-pushed the cherry-pick-yaml-as-defs branch from acf1e6e to 6c4fecc Compare May 28, 2026 21:51
Comment thread test/Feature/InlineRT/indexed-triangle-setup.test Outdated
Comment thread test/Feature/InlineRT/indexed-triangle-setup.test Outdated
Add AccelerationStructure to ResourceKind and introduce pipeline structs
(TriangleGeometry, AABBGeometry, BLASDesc, InstanceDesc, TLASDesc) with
YAML parsing and name resolution for buffer/BLAS/TLAS references. Backend
switch statements are updated to handle the new enum value. Includes three
placeholder InlineRT test files exercising the new YAML format (gated
behind REQUIRES: raytracing).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@MarijnS95 MarijnS95 force-pushed the cherry-pick-yaml-as-defs branch from 6c4fecc to 8ef7553 Compare May 29, 2026 08:37
@MarijnS95

Copy link
Copy Markdown
Collaborator Author

Test failures are unrelated to this PR, merging.

@MarijnS95 MarijnS95 merged commit 59fc101 into llvm:main May 29, 2026
24 of 28 checks passed
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.

4 participants