Summary
On DeviceType.cpu, calling a Slang function that takes a fixed-size array parameter (e.g. float x[3]) with a Python list segfaults (SIGSEGV) during array-parameter marshalling. This is a distinct, pre-existing CPU-backend defect that was unmasked by the #1136 dispatch-limits fix: previously the "Device reports zero compute dispatch groups in X" throw (#1136) fired first, so this code path was never reached on CPU. GPU backends (Vulkan / CUDA / D3D12 / Metal) handle the same call correctly.
Repro
Requires a build where the #1136 regression is fixed (PR #1137, or slang-rhi#854 + a submodule bump) — otherwise the #1136 throw fires first and this path is unreachable.
import slangpy as spy
dev = spy.create_device(type=spy.DeviceType.cpu)
mod = spy.Module.load_from_source(dev, "m", "float first(float x[3]) { return x[0]; }")
mod.first([3.0, 4.0, 5.0]) # SIGSEGV during array-parameter marshalling
This is the DeviceType.cpu case of the existing slangpy/tests/slangpy_tests/test_simple_function_call.py::test_pass_float_array (which passes on all GPU backends).
Context / provenance
Environment
Layer (to be pinned by triage)
Candidate layers for the fault: slangpy_ext array-parameter marshalling (src/slangpy_ext/), the slang-rhi CPU backend, or the slang compiler's CPU (host-callable) target. Triage to follow. Suggested priority: P2 (CPU backend was already entirely unusable before the #1136 fix, so this is not a fresh regression).
Related: #1136 (dispatch-limits regression; durable root fix in shader-slang/slang-rhi#854), #1137 (the fix that unmasked this). This issue is intentionally not linked as Fixes #1136.
🤖 Generated by an automated SlangPy coworker — may be inaccurate. A human maintainer should verify.
Summary
On
DeviceType.cpu, calling a Slang function that takes a fixed-size array parameter (e.g.float x[3]) with a Python list segfaults (SIGSEGV) during array-parameter marshalling. This is a distinct, pre-existing CPU-backend defect that was unmasked by the #1136 dispatch-limits fix: previously the "Device reports zero compute dispatch groups in X" throw (#1136) fired first, so this code path was never reached on CPU. GPU backends (Vulkan / CUDA / D3D12 / Metal) handle the same call correctly.Repro
Requires a build where the #1136 regression is fixed (PR #1137, or slang-rhi#854 + a submodule bump) — otherwise the #1136 throw fires first and this path is unreachable.
This is the
DeviceType.cpucase of the existingslangpy/tests/slangpy_tests/test_simple_function_call.py::test_pass_float_array(which passes on all GPU backends).Context / provenance
test_cpu_dispatch.py) works end-to-end; only this array-parameter path segfaults.external/slang-rhi/tests/testing.cpp: "Known issues with CPU backend on linux").Environment
mainwith the Every compute dispatch on the CPU device fails: "Device reports zero compute dispatch groups in X" (regression in 0.43.0) #1136 fix applied (PR Treat zero compute-dispatch-group limit as unbounded (fixes #1136) #1137, branchdev/slangpy-fixer/slangpy-1136), linux-gcc debug; slang-rhi submodule @22239042.DeviceType.cpu. GPU backends unaffected.Layer (to be pinned by triage)
Candidate layers for the fault: slangpy_ext array-parameter marshalling (
src/slangpy_ext/), the slang-rhi CPU backend, or the slang compiler's CPU (host-callable) target. Triage to follow. Suggested priority: P2 (CPU backend was already entirely unusable before the #1136 fix, so this is not a fresh regression).Related: #1136 (dispatch-limits regression; durable root fix in shader-slang/slang-rhi#854), #1137 (the fix that unmasked this). This issue is intentionally not linked as
Fixes #1136.🤖 Generated by an automated SlangPy coworker — may be inaccurate. A human maintainer should verify.