Skip to content

Add a runtime slang-test for the abort feature (VK_KHR_shader_abort) #11790

Description

@nv-slang-bot

Summary

Add a runtime test (via slang-test) that exercises the abort intrinsic shipped in #11542, executing on a Vulkan device that supports the new VK_KHR_shader_abort API.

Requested by @jkwak-work in #11528 (comment).

Background

The feature currently has compile-/emit-side coverage, but no runtime test that actually runs an abort-using shader on a GPU and validates its behaviour. This issue tracks adding that runtime test.

What the test should do

  • Compile a Slang shader that calls abort(...) (with a format string + arguments) for a Vulkan/SPIR-V target.
  • Run it on a Vulkan device using the new VK_KHR_shader_abort API path, with the shaderAbort feature enabled (VkPhysicalDeviceShaderAbortFeaturesKHR) and the AbortKHR SPIR-V capability declared.
  • Validate that the abort actually fires and that the abort message round-trips correctly (e.g. the format string + args reach the host).

Runtime-validation constraint (carried from triage)

Per the Vulkan proposal, abort ceases all further processing in the invocation and causes other invocations to terminate, which triggers device loss. Observing/validating the abort — in particular retrieving the abort message — requires VK_KHR_device_fault (vkGetDeviceFaultDebugInfoKHR() with a chained VkDeviceFaultShaderAbortMessageInfoKHR). Without VK_KHR_device_fault, the abort still causes device loss but the message cannot be retrieved.

Implications for this test:

  • It needs a real GPU + Vulkan driver that supports both VK_KHR_shader_abort (with the shaderAbort feature) and VK_KHR_device_fault.
  • It is therefore not validatable in the current CI (no GPU; and the two extensions may not be available on available runners).
  • The test should be gated on device-feature/extension detection at runtime and skipped where unsupported, and likely needs a dedicated GPU runner (or manual/local execution) until such infra exists. Expect it to run as a GPU-only / opt-in test rather than part of the default CI matrix.

Scope

Runtime slang-test coverage for abort only. The separate emit-side OpExtension token note (Gap C) stays flagged on #11528 and is out of scope here.

🤖 Generated by an automated Slang coworker — may be inaccurate. A human maintainer should verify.

Metadata

Metadata

Assignees

Labels

TestingGeneral testing relatedslang-testslang-test tool relatedspirv_vulkanSPIRV target for Vulkan

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions