Skip to content

Commit 37c579e

Browse files
authored
Temporarily disable test requring large shared memory. (#1802)
1 parent 5f375d0 commit 37c579e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

torch/csrc/jit/codegen/cuda/test/test_gpu.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9432,6 +9432,13 @@ TEST_F(NVFuserTest, FusionPersistentSoftmaxLocalSmem_CUDA) {
94329432
const int64_t dimx = 1024;
94339433
const int64_t dimy = 16384;
94349434

9435+
auto properties = at::cuda::getDeviceProperties(0);
9436+
// Require 70KB of smem to run test
9437+
const size_t required_smem_size = 70 << 10;
9438+
if (properties->sharedMemPerBlockOptin < required_smem_size) {
9439+
GTEST_SKIP() << "not enough shared memory space on device to run test";
9440+
}
9441+
94359442
auto options = at::TensorOptions().dtype(at::kFloat).device(at::kCUDA, 0);
94369443
at::Tensor aten_input = at::randn({dimx, dimy}, options);
94379444
at::Tensor aten_static_in = aten_input.narrow(1, 0, static_size);
@@ -9631,6 +9638,13 @@ TEST_F(NVFuserTest, FusionPersistentNormLocalShared_CUDA) {
96319638
fe.compileFusion(&fusion, aten_inputs);
96329639
fe.runFusion(aten_inputs, {cg_static_out, cg_dynamic_out});
96339640

9641+
auto properties = at::cuda::getDeviceProperties(0);
9642+
// Require 70KB of smem to run test
9643+
const size_t required_smem_size = 70 << 10;
9644+
if (properties->sharedMemPerBlockOptin < required_smem_size) {
9645+
GTEST_SKIP() << "not enough shared memory space on device to run test";
9646+
}
9647+
96349648
auto at_mu = at::mean(aten_input.to(at::kDouble), -1).unsqueeze(1);
96359649
auto at_var = at::var(aten_input.to(at::kDouble), -1, false).unsqueeze(1);
96369650
auto at_rvar = at::rsqrt(at::add(at_var, kEps));

0 commit comments

Comments
 (0)