rtx-backend: gate CUDA parity tests to x86_64 Linux

The rtx-backend-cuda dev-dependency is already gated to
cfg(all(linux, x86_64)) in Cargo.toml, but the test file imported it
unconditionally, so cargo test -p rtx-backend failed to compile on macOS.

Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
quantum
2026-08-21 05:52:03 -07:00
co-authored by Claude Fable 5
parent 72b41e3167
commit 2e23d0f4c6
@@ -88,6 +88,7 @@ fn test_cpu_baseline_operations() {
// CUDA Backend Parity Tests // CUDA Backend Parity Tests
// ============================================================================== // ==============================================================================
#[cfg(all(target_os = "linux", target_arch = "x86_64"))]
mod cuda_parity { mod cuda_parity {
use super::*; use super::*;
use rtx_backend_cpu::{CpuBackend, CpuDevice}; use rtx_backend_cpu::{CpuBackend, CpuDevice};
@@ -365,7 +366,8 @@ fn test_backend_feature_detection() {
// CPU is always available // CPU is always available
println!(" CPU Backend: Available"); println!(" CPU Backend: Available");
// Check CUDA // Check CUDA (dev-dep only present on x86_64 Linux)
#[cfg(all(target_os = "linux", target_arch = "x86_64"))]
{ {
use rtx_backend_cuda::CudaDevice; use rtx_backend_cuda::CudaDevice;
match CudaDevice::new(0) { match CudaDevice::new(0) {