8000 skip dynamic shape tests, adjust cpu rng test · pytorch/pytorch@28c48ec · GitHub
[go: up one dir, main page]

Skip to content

Commit 28c48ec

Browse files
committed
skip dynamic shape tests, adjust cpu rng test
1 parent b4c530f commit 28c48ec

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

aten/src/ATen/test/rng_test.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ void test_random_from_to(const at::Device& device) {
137137
range = static_cast<uint64_t>(max_to) - static_cast<uint64_t>(from) + 1;
138138
from_case_covered = true;
139139
}
140-
if (range < (1ULL << 32)) {
140+
// this is leaking details of implementation into test
141+
// we are starting to use random64() at 2^25 to minimize skew due to %
142+
if (range < (1ULL << 25)) {
141143
exp = static_cast<T>(static_cast<int64_t>((static_cast<uint32_t>(val) % range + from)));
142144
} else {
143145
exp = static_cast<T>(static_cast<int64_t>((val % range + from)));

test/inductor/test_torchinductor_codegen_dynamic_shapes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def run(*ex, **kwargs):
231231
"test_pointwise_laguerre_polynomial_l_dynamic_shapes": TestFailure(("cuda", "xpu")),
232232
"test_pointwise_legendre_polynomial_p_dynamic_shapes": TestFailure(("cuda", "xpu")),
233233
"test_polar_dynamic_shapes": TestFailure(("cpu", "cuda", "xpu"), is_skip=True),
234-
"test_randint_distribution": TestFailure(("cuda",)),
234+
"test_randint_distribution_dynamic_shapes": TestFailure(("cuda",)),
235235
"test_randn_generator_dynamic_shapes": TestFailure(("cpu",)),
236236
"test_randn_like_empty_dynamic_shapes": TestFailure(("cpu", "cuda", "xpu")),
237237
"test_single_elem_dynamic_shapes": TestFailure(("cpu",)),

test/inductor/test_torchinductor_dynamic_shapes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
("cpu", "cuda", "xpu")
6060
),
6161
"test_conv_inference_heuristics_dynamic_shapes": TestFailure(("cuda", "xpu")),
62-
"test_randint_distribution": TestFailure(("cuda",)),
62+
"test_randint_distribution_dynamic_shapes": TestFailure(("cuda",)),
6363
}
6464

6565
if TEST_WITH_ROCM:

0 commit comments

Comments
 (0)
0