Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Disable GPU in unit test #4025

Merged
merged 2 commits into from
Aug 5, 2021
Merged

Disable GPU in unit test #4025

merged 2 commits into from
Aug 5, 2021

Conversation

liuzhe-lz
Copy link
Contributor

@liuzhe-lz liuzhe-lz commented Aug 5, 2021

Currently the UT will not exit if the machine has GPU. This is because local training service test case will open GPU metric file and will never close it. We could add closing logic to fix it, but I think it's not the right way.
Our default UT environment is CPU-only, and by design an experiment with GPU number > 1 should fail on this type of machine. The test case was passing by accident because the error of GPU scheduler is silently ignored. And since it failed to generate GPU metric file, there is no closing issue.
This does not harm real experiments because they are stopped by process.exit(), which will not be blocked by file handlers.

@liuzhe-lz liuzhe-lz changed the title Disable GPU in unit test+ Disable GPU in unit test Aug 5, 2021
@ultmaster
Copy link
Contributor

I triggered an IT to test this PR. Please ensure it passes before merge.

https://msrasrg.visualstudio.com/NNIOpenSource/_build/results?buildId=25918

@QuanluZhang QuanluZhang merged commit 299d01d into master Aug 5, 2021
@liuzhe-lz liuzhe-lz deleted the tmp-gpu-ut branch August 11, 2021 04:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants