@@ -296,7 +296,7 @@ test_python() {
296296}
297297
298298
299- test_dynamo_shard () {
299+ test_dynamo_wrapped_shard () {
300300 if [[ -z " $NUM_TEST_SHARDS " ]]; then
301301 echo " NUM_TEST_SHARDS must be defined to run a Python test shard"
302302 exit 1
@@ -380,6 +380,10 @@ test_inductor_cpp_wrapper() {
380380 TEST_REPORTS_DIR=$( pwd) /test/test-reports
381381 mkdir -p " $TEST_REPORTS_DIR "
382382
383+ # Run certain inductor unit tests with cpp wrapper. In the end state, we should be able to run all the inductor
384+ # unit tests with cpp wrapper.
385+ python test/run_test.py --include inductor/test_torchinductor.py --verbose
386+
383387 python benchmarks/dynamo/timm_models.py --device cuda --accuracy --amp \
384388 --training --inductor --disable-cudagraphs --only vit_base_patch16_224 \
385389 --output " $TEST_REPORTS_DIR /inductor_cpp_wrapper_training.csv"
@@ -802,7 +806,7 @@ test_without_numpy() {
802806 # Regression test for https://github.com/pytorch/pytorch/issues/66353
803807 python -c " import sys;sys.path.insert(0, 'fake_numpy');import torch;print(torch.tensor([torch.tensor(0.), torch.tensor(1.)]))"
804808 # Regression test for https://github.com/pytorch/pytorch/issues/109387
805- if [[ " ${TEST_CONFIG} " == * dynamo * ]]; then
809+ if [[ " ${TEST_CONFIG} " == * dynamo_wrapped * ]]; then
806810 python -c " import sys;sys.path.insert(0, 'fake_numpy');import torch;torch.compile(lambda x:print(x))('Hello World')"
807811 fi
808812 popd
@@ -1475,9 +1479,9 @@ elif [[ "${TEST_CONFIG}" == *inductor* ]]; then
14751479 test_inductor_distributed
14761480 fi
14771481 fi
1478- elif [[ " ${TEST_CONFIG} " == * dynamo * ]]; then
1482+ elif [[ " ${TEST_CONFIG} " == * dynamo_wrapped * ]]; then
14791483 install_torchvision
1480- test_dynamo_shard " ${SHARD_NUMBER} "
1484+ test_dynamo_wrapped_shard " ${SHARD_NUMBER} "
14811485 if [[ " ${SHARD_NUMBER} " == 1 ]]; then
14821486 test_aten
14831487 fi
0 commit comments