Skip to content

Make tuning tests for OpenMP independent of platforms#432

Open
roastduck wants to merge 4 commits intomasterfrom
auto_schedule
Open

Make tuning tests for OpenMP independent of platforms#432
roastduck wants to merge 4 commits intomasterfrom
auto_schedule

Conversation

@roastduck
Copy link
Owner

For test_auto_fission_fuse.py::test_tune_fuse and test_auto_fission_fuse.py::test_tune_fission, I compare two candidate scheduling plans during the test run, and use the comparing result to check our tuner, instead of expecting a preset result. I did not apply this change to the CUDA test test_auto_fission_fuse.py::test_tune_with_cond yet, because it has 4 different types of candidate plans.

To make things work, I also restart OpenMP at the beginning of timing by omp_pause_resource_all. It works, but I am not sure how the running time of OpenMP is affected. If not restarting OpenMP, every timing runs all returned a low stddev, but time from different runs differed greatly. It worth noting that omp_pause_resource_all is only available since OpenMP 5.0, which makes use impossible to use it from PyTorch's OpenMP 4.0, required by #421.

With the above changes, I removed the OMP_PROC_BIND magic set by #266.

@roastduck roastduck requested a review from Blealtan May 5, 2023 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant