Skip to content

Commit b66aa1a

Browse files
robert-hardwickpytorchmergebot
authored andcommitted
[ARM] Add test_memory_profiler to aarch64 tests (pytorch#145260)
TestMemoryProfilerE2E.test_memory_timeline is failing on AArch64, this fixes it and enables it in the opt-in list of tests for AArch64. Fixes pytorch#142371 Pull Request resolved: pytorch#145260 Approved by: https://github.com/fadara01, https://github.com/sraikund16
1 parent 207f104 commit b66aa1a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.ci/pytorch/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1579,7 +1579,7 @@ test_executorch() {
15791579
test_linux_aarch64() {
15801580
python test/run_test.py --include test_modules test_mkldnn test_mkldnn_fusion test_openmp test_torch test_dynamic_shapes \
15811581
test_transformers test_multiprocessing test_numpy_interop test_autograd test_binary_ufuncs test_complex test_spectral_ops \
1582-
test_foreach test_reductions test_unary_ufuncs test_tensor_creation_ops test_ops \
1582+
test_foreach test_reductions test_unary_ufuncs test_tensor_creation_ops test_ops profiler/test_memory_profiler \
15831583
distributed/elastic/timer/api_test distributed/elastic/timer/local_timer_example distributed/elastic/timer/local_timer_test \
15841584
--shard "$SHARD_NUMBER" "$NUM_TEST_SHARDS" --verbose
15851585

test/profiler/test_memory_profiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1492,7 +1492,7 @@ def id_for_testing(key):
14921492
for _, action, (key, version), size in prof._memory_profile().timeline
14931493
# We generally don't care about tiny allocations during memory
14941494
# profiling and they add a lot of noise to the unit test.
1495-
if size > 1024
1495+
if size > 1024 and isinstance(key, _memory_profiler.TensorKey)
14961496
]
14971497

14981498
self.assertExpectedInline(

0 commit comments

Comments
 (0)