|
|
@@ -160,6 +160,13 @@ fn build_valu_cs(body: &[u32]) -> HostShader {
|
|
|
shader
|
|
|
}
|
|
|
|
|
|
+/// One GPU test at a time. With these tests on the hardware adapter and WARP
|
|
|
+/// from several test threads at once, now and then none of their dispatches
|
|
|
+/// ever completes and the test binary hangs; and two GPU tests at once on
|
|
|
+/// WARP can end the test process with an access violation. Other GPU test
|
|
|
+/// modules take this lock too.
|
|
|
+pub(super) static ONE_AT_A_TIME: std::sync::Mutex<()> = std::sync::Mutex::new(());
|
|
|
+
|
|
|
/// Runs `shader` on every available SM 6.6 host (hardware GPU and WARP) for
|
|
|
/// each 4-dword input set and invokes `check(backend, case_index, inputs, result_dword)`.
|
|
|
fn run_cases(
|
|
|
@@ -167,10 +174,6 @@ fn run_cases(
|
|
|
cases: &[[u32; 4]],
|
|
|
mut check: impl FnMut(&str, usize, [u32; 4], u32),
|
|
|
) {
|
|
|
- // One test at a time: with these tests on the hardware adapter and WARP
|
|
|
- // from several test threads at once, now and then none of their
|
|
|
- // dispatches ever completes and the test binary hangs.
|
|
|
- static ONE_AT_A_TIME: std::sync::Mutex<()> = std::sync::Mutex::new(());
|
|
|
let _one = ONE_AT_A_TIME.lock().unwrap_or_else(|e| e.into_inner());
|
|
|
let mut ran = 0;
|
|
|
for (label, warp) in [("hardware", false), ("warp", true)] {
|