• Home
Name Date Size #Lines LOC

..--

config/06-May-2025-4642

README.mdD06-May-20252.3 KiB6548

get_case_pytest_mark.pyD06-May-20253 KiB8768

psr_module_attr.pyD06-May-20259.7 KiB231187

run_st.pyD06-May-202532.4 KiB783636

run_st.shD06-May-20253.2 KiB11370

README.md

1# how to run mindspore st
2
3## Modify env config file
4
5modify file `config/env_config.yaml`, the meaning of each field is as follows:
6
7```yaml
8pytest_path: ${HOME}/miniconda3/envs/py3.7/bin//pytest
9python_path: ${HOME}/miniconda3/envs/py3.7/bin//python3
10extend_envs: export PATH=${HOME}/miniconda3/envs/py3.9/bin:${PATH}; export PYTHONPATH=${HOME}/workspace/mindspore:${PYTHONPATH}
11run_path: ${HOME}/workspace/mindspore/run
12log_path: ${HOME}/workspace/mindspore/log
13virtualenv:
14  device_env_var_name: DEVICE_ID
15  device_ids:
16    - 0
17  overall_networks: true
18```
19
20| field | value | description |
21| ----- | ----- | ----------- |
22| pytest_path | \${HOME}/miniconda3/envs/py3.7/bin//pytest | Path of pytest, if starts with XXX, the st test script will find it according to user's environment |
23| python_path | \${HOME}/miniconda3/envs/py3.7/bin//pytest | Path of python, if starts with XXX, the st test script will find it according to user's environment |
24| extend_envs | export PATH=\${HOME}/miniconda3/envs/py3.7/bin:\${PATH}; export PYTHONPATH=\${HOME}/workspace/mindspore:\${PYTHONPATH} | Commands to be executed before running each testcase, if starts with XXX, the st test script will set it according to user's configurations |
25| run_path | /tmp/ms_run | Working path of running 1P testcase |
26| log_path | /tmp/ms_log | Log path for saving logs of failed testcases |
27| device_ids | a yaml list of type int | On which devices the mindspore st will run |
28| overall_networks | true/false | When set to true and device_ids is 0~7 indicating this machine can run 8P testcases, otherwise only 1P will be exectuted |
29
30## Requirements & Dependencies
31
32- requirements
33
34  ```bash
35  pytest <= 6.0.0
36  ```
37
38- Dependencies
39
40   ```bash
41   pip install pycocotools matplotlib scikit-learn opencv-python easydict torch==1.12
42   ```
43
44## Run st testcases
45
46- ascend910
47
48  ```bash
49  bash run_st.sh -p ascend -c ascend910 -l level0 -r ${HOME}/workspace/mindspore
50  ```
51
52- gpu
53
54  ```bash
55  # cuda-10.1
56  bash run_st.sh -p gpu -c cuda-10.1 -l level0 -r ${HOME}/workspace/mindspore
57  # cuda-11.1 or cuda-11.6
58  bash run_st.sh -p gpu -c cuda-11.1 -l level0 -r ${HOME}/workspace/mindspore
59  ```
60
61## Running result
62
631. Commands of executing testcases are save to file `run_cmds.csv` in the same directory as `run_st.sh`.
642. Logs of failed testcase are saved to `log_path` configured in file `config/env_config.yaml`.
65