From 145f93623005b2a33491b5f256b86bdcf1c417dd Mon Sep 17 00:00:00 2001 From: 39ali Date: Mon, 27 Apr 2026 00:09:28 +0300 Subject: [PATCH] fix warp assert on pow of 2 --- crates/cuda_std/src/warp.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/cuda_std/src/warp.rs b/crates/cuda_std/src/warp.rs index 6f3e13ab..409aa0e0 100644 --- a/crates/cuda_std/src/warp.rs +++ b/crates/cuda_std/src/warp.rs @@ -766,7 +766,7 @@ unsafe fn warp_shuffle_32( } assert!( - !(width & (width - 1)) != 0 && width <= 32, + width != 0 && (width & (width - 1)) == 0 && width <= 32, "width must be a power of 2 and less than or equal to 32" );