'pytorch and cuda version not matched but still working

i install cuda version 10.1 original, and torch==1.9.0+cu111 and i dont install any other version of cuda

but torch.cuda.is_available() return True and still working

may i keep this setting and if not, is there any way to check version matching?

~/.bashrc setting is below

export PATH=/usr/local/cuda-10.1/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-10.1/lib64:$LD_LIBRARY_PATH
export CUDA_HOME=/usr/local/cuda-10.1 


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source