-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suppressed UserWarning: TORCH_CUDA_ARCH_LIST #3160
Conversation
@AlexanderDokuchaev , @alexsu52 , please take a look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution!
I believe that this solution can be extended to all cases of using NNCF, not just for mobilenet_v2 example. I'm sure such PR will be more valuable for NNCF users.
I would suggest the following:
- Move the suppression code in the method which compiles NNCF extension for GPU
nncf/nncf/torch/extensions/__init__.py
Line 102 in 909ce0a
async_result = pool.apply_async(self._loader.load) - Rework warning suppression via warning filtering:
with warnings.catch_warnings():
warnings.filterwarnings("ignore", message="TORCH_CUDA_ARCH_LIST is not set")
pool = ThreadPool(processes=1)
async_result = pool.apply_async(self._loader.load)
self._loaded_namespace = async_result.get(timeout=timeout)
Hi, @alexsu52. I have made the requested changes. Please let me know if any further modifications are needed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@devesh-2002, please, fix pre-commit linters |
@devesh-2002 , thanks for your contribution! |
Thank you @MaximProshin @alexsu52 for all the help! |
Changes
TORCH_CUDA_ARCH_LIST warning is suppressed using
torch.cuda.get_arch_list()
.Please let me know, if any changes are required.
Related tickets
Solves issue #3141