Skip to content

Commit

Permalink
[CI] Refactor unittest folder (apache#16110)
Browse files Browse the repository at this point in the history
The current unittest folder is too large and contains too many files and
too many components. This PR refactors the unittest folder by moving the
files to the corresponding folders.
  • Loading branch information
Hzfengsy authored Nov 15, 2023
1 parent 015da7c commit bd67d2e
Show file tree
Hide file tree
Showing 439 changed files with 45 additions and 21 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ jobs:
- name: Minimal Metal Compile-Only
shell: bash -l {0}
run: |
python -m pytest -v -s 'tests/python/unittest/test_allreduce.py::test_allreduce_sum_compile'
python -m pytest -v -s 'tests/python/unittest/test_target_codegen_metal.py::test_func_with_trailing_pod_params'
python -m pytest -v -s 'tests/python/codegen/test_gpu_codegen_allreduce.py::test_allreduce_sum_compile'
python -m pytest -v -s 'tests/python/codegen/test_target_codegen_metal.py::test_func_with_trailing_pod_params'
- name: Minimal Metal Compile-and-Run
shell: bash -l {0}
run: >-
python -m pytest -v -s 'tests/python/unittest/test_allreduce.py::test_allreduce_sum[dims0-metal]'
python -m pytest -v -s 'tests/python/codegen/test_gpu_codegen_allreduce.py::test_allreduce_sum[dims0-metal]'
- name: Test iOS RPC
shell: bash -l {0}
run: >-
Expand Down
2 changes: 1 addition & 1 deletion conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

# These rely on running on the same node to pass successfully
FIXED_ALLOCATION_PREFIXES = {
"tests/python/unittest/test_tvm_testing_features.py": 0,
"tests/python/testing/test_tvm_testing_features.py": 0,
}


Expand Down
2 changes: 1 addition & 1 deletion docs/contribute/pull_request.rst
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ each time (e.g. you can test a change in CPU and i386 while retaining incrementa
python tests/scripts/ci.py cpu --unittest
# quickly iterate by running a specific test and skipping the rebuild each time
python tests/scripts/ci.py cpu --skip-build --tests tests/python/unittest/test_tir_transform_inject_rolling_buffer.py::test_upscale
python tests/scripts/ci.py cpu --skip-build --tests tests/python/tir-transform/test_tir_transform_inject_rolling_buffer.py::test_upscale
# run the CPU build and drop into a shell in the container
python tests/scripts/ci.py cpu --interactive
Expand Down
2 changes: 1 addition & 1 deletion python/tvm/testing/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ def _split_scope(self, nodeid):
# serialized
items = {
"test_tvm_testing_features": "functional-tests",
"tests/python/unittest/test_crt": "crt-tests",
"tests/python/micro/test_crt": "crt-tests",
"tests/python/driver/tvmc": "tvmc-tests",
}

Expand Down
2 changes: 1 addition & 1 deletion src/auto_scheduler/transform_step.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1669,7 +1669,7 @@ int CacheWriteStepNode::ApplyToState(State* state, const ComputeDAG& dag) const
int next_stage_id = stage_id + 2;
// TODO(jc94): Fix the cache write bug in TVM and remove added_op == 2 support.
// TVM's cache_write has a bug with multi outputs. See
// `tests/python/unittest/test_auto_scheduler_loop_state.py::test_cache_read_write` test
// `tests/python/auto_scheduler/test_auto_scheduler_loop_state.py::test_cache_read_write` test
// for more details
if (added_ops == 2) {
pstate->stages.insert(pstate->stages.begin() + next_stage_id,
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/hexagon/profiler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ only when `instr_siblings` is disabled. By default, it is set to 0.
By default, it is set to 1.

For additional usage information on various config flags, please refer to the tests in
`tests/python/unittest/test_tir_transform_profiling_instr.py`
`tests/python/tir-transform/test_tir_transform_profiling_instr.py`


## How to use lightweight profiling with RPC Launcher:
Expand Down
4 changes: 2 additions & 2 deletions tests/lint/pylint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ set -euxo pipefail

python3 -m pylint python/tvm --rcfile="$(dirname "$0")"/pylintrc
python3 -m pylint vta/python/vta --rcfile="$(dirname "$0")"/pylintrc
python3 -m pylint tests/python/unittest/test_crt.py --rcfile="$(dirname "$0")"/pylintrc
python3 -m pylint tests/python/unittest/test_tvmscript_type.py --rcfile="$(dirname "$0")"/pylintrc
python3 -m pylint tests/python/micro/test_crt.py --rcfile="$(dirname "$0")"/pylintrc
python3 -m pylint tests/python/tvmscript/test_tvmscript_type.py --rcfile="$(dirname "$0")"/pylintrc
python3 -m pylint tests/python/contrib/test_cmsisnn --rcfile="$(dirname "$0")"/pylintrc
python3 -m pylint tests/python/contrib/test_ethosn --rcfile="$(dirname "$0")"/pylintrc
python3 -m pylint tests/python/relay/aot/*.py --rcfile="$(dirname "$0")"/pylintrc
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions tests/python/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
COLLECT_IGNORE.append("frontend/tflite")
COLLECT_IGNORE.append("frontend/onnx")
COLLECT_IGNORE.append("driver/tvmc/test_autoscheduler.py")
COLLECT_IGNORE.append("unittest/test_auto_scheduler_cost_model.py") # stack overflow
# COLLECT_IGNORE.append("unittest/test_auto_scheduler_measure.py") # exception ignored
COLLECT_IGNORE.append("unittest/test_auto_scheduler_search_policy.py") # stack overflow
# COLLECT_IGNORE.append("unittest/test_auto_scheduler_measure.py") # exception ignored
COLLECT_IGNORE.append("auto_scheduler/test_auto_scheduler_cost_model.py") # stack overflow
# COLLECT_IGNORE.append("auto_scheduler/test_auto_scheduler_measure.py") # exception ignored
COLLECT_IGNORE.append("auto_scheduler/test_auto_scheduler_search_policy.py") # stack overflow
# COLLECT_IGNORE.append("auto_scheduler/test_auto_scheduler_measure.py") # exception ignored

COLLECT_IGNORE.append("unittest/test_tir_intrin.py")
COLLECT_IGNORE.append("tir_base/test_tir_intrin.py")


def pytest_addoption(parser):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit bd67d2e

Please sign in to comment.