fix cuda mem leak check not properly run on master_builds (#60742)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/60742
improved CI_MASTER flag check logic, since it can be unset, true or false
Test Plan:
search for `PYTORCH_TEST_SKIP_CUDA_MEM_LEAK_CHECK` in logs below:
- Before adding ci/master:
- build workflow (`PYTORCH_TEST_SKIP_CUDA_MEM_LEAK_CHECK=1`): https://circleci.com/api/v1.1/project/github/pytorch/pytorch/14394913/output/107/0?file=true&allocation-id=60d5fd2fa55ae50282aec997-0-build%2F10295B30
- After adding ci/master label:
- build workflow (`PYTORCH_TEST_SKIP_CUDA_MEM_LEAK_CHECK=0`): https://circleci.com/api/v1.1/project/github/pytorch/pytorch/14398213/output/107/0?file=true&allocation-id=60d61cf8bb9d097afc7a11aa-0-build%2F400138F1
- master build workflow (`PYTORCH_TEST_SKIP_CUDA_MEM_LEAK_CHECK=0`): https://circleci.com/api/v1.1/project/github/pytorch/pytorch/14398198/output/107/0?file=true&allocation-id=60d61ca3467438480c963290-0-build%2F2999C909
Reviewed By: ngimel
Differential Revision: D29405732
Pulled By: walterddr
fbshipit-source-id: 09dd653cbb47ca61b1f8872851bda6db8db671b9
Author
Rong Rong (AI Infra)