PowerShell 7 环境已加载 (版本: 7.5.2)
PS C:\Users\Administrator\Desktop> cd E:\PyTorch_Build\pytorch
PS E:\PyTorch_Build\pytorch> .\pytorch_env\Scripts\activate
(pytorch_env) PS E:\PyTorch_Build\pytorch> # 移除可能导致冲突的镜像源
(pytorch_env) PS E:\PyTorch_Build\pytorch> conda config --remove-key channels
(pytorch_env) PS E:\PyTorch_Build\pytorch> conda config --remove-key default_channels
CondaKeyError: 'default_channels': undefined in config
(pytorch_env) PS E:\PyTorch_Build\pytorch>
(pytorch_env) PS E:\PyTorch_Build\pytorch> # 设置官方通道优先级
(pytorch_env) PS E:\PyTorch_Build\pytorch> conda config --add channels pytorch-nightly
C:\Miniconda3\Lib\site-packages\conda\base\context.py:211: FutureWarning: Adding 'defaults' to channel list implicitly is deprecated and will be removed in 25.9.
To remove this warning, please choose a default channel explicitly with conda's regular configuration system, e.g. by adding 'defaults' to the list of channels:
conda config --add channels defaults
For more information see https://docs.conda.io/projects/conda/en/stable/user-guide/configuration/use-condarc.html
deprecated.topic(
(pytorch_env) PS E:\PyTorch_Build\pytorch> conda config --add channels nvidia
(pytorch_env) PS E:\PyTorch_Build\pytorch> conda config --add channels conda-forge
(pytorch_env) PS E:\PyTorch_Build\pytorch> conda config --add channels defaults
Warning: 'defaults' already in 'channels' list, moving to the top
(pytorch_env) PS E:\PyTorch_Build\pytorch>
(pytorch_env) PS E:\PyTorch_Build\pytorch> # 设置通道优先级为 strict(避免混合来源包)
(pytorch_env) PS E:\PyTorch_Build\pytorch> conda config --set channel_priority strict
(pytorch_env) PS E:\PyTorch_Build\pytorch>
(pytorch_env) PS E:\PyTorch_Build\pytorch> # 验证配置
(pytorch_env) PS E:\PyTorch_Build\pytorch> conda config --show channels
channels:
- defaults
- conda-forge
- nvidia
- pytorch-nightly
(pytorch_env) PS E:\PyTorch_Build\pytorch> conda config --show channel_priority
channel_priority: strict
(pytorch_env) PS E:\PyTorch_Build\pytorch> # 1. 安装基础依赖
(pytorch_env) PS E:\PyTorch_Build\pytorch> conda install -y python=3.10 cudatoolkit=12.1 cudnn numpy ninja
3 channel Terms of Service accepted
Channels:
- defaults
- conda-forge
- nvidia
- pytorch-nightly
Platform: win-64
Collecting package metadata (repodata.json): done
Solving environment: failed
LibMambaUnsatisfiableError: Encountered problems while solving:
- unsupported request
- package mkl-service-2.5.2-py313haca3b5c_0 requires python_abi 3.13.* *_cp313, but none of the providers can be instd
Could not solve for environment specs
The following packages are incompatible
├─ cudatoolkit =12.1 * does not exist (perhaps a typo or a missing channel);
├─ mkl-service =* * is installable with the potential options
│ ├─ mkl-service 2.5.2 would require
│ │ └─ python_abi =3.13 *_cp313 with the potential options
│ │ ├─ python_abi 3.13 would require
│ │ │ └─ python =3.13 *_cp313, which can be installed;
│ │ └─ python_abi 3.13 conflicts with any installable versions previously reported;
│ ├─ mkl-service 1.1.2 would require
│ │ └─ mkl >=2019.1,<2021.0a0 *, which can be installed;
│ ├─ mkl-service 1.1.2 would require
│ │ └─ mkl >=2018.0.0,<2019.0a0 *, which can be installed;
│ ├─ mkl-service 1.1.2 would require
│ │ └─ mkl >=2018.0.3,<2019.0a0 *, which can be installed;
│ ├─ mkl-service 2.0.2 would require
│ │ └─ mkl >=2019.3,<2021.0a0 *, which can be installed;
│ ├─ mkl-service 2.3.0 would require
│ │ └─ mkl >=2019.4,<2021.0a0 *, which can be installed;
│ ├─ mkl-service [2.3.0|2.4.0] would require
│ │ └─ mkl >=2021.2.0,<2022.0a0 *, which can be installed;
│ ├─ mkl-service 2.4.0 would require
│ │ └─ mkl >=2021.4.0,<2022.0a0 *, which can be installed;
│ ├─ mkl-service 2.4.0 would require
│ │ └─ mkl >=2023.1.0,<2024.0a0 *, which can be installed;
│ ├─ mkl-service 2.4.0 would require
│ │ └─ mkl >=2025.0.0,<2026.0a0 *, which can be installed;
│ └─ mkl-service [2.0.1|2.0.2|...|2.5.2] conflicts with any installable versions previously reported;
├─ mkl ==2024.2.2 * is not installable because it conflicts with any installable versions previously reported;
└─ python =3.10 * is not installable because it conflicts with any installable versions previously reported.
(pytorch_env) PS E:\PyTorch_Build\pytorch>
(pytorch_env) PS E:\PyTorch_Build\pytorch> # 2. 单独安装 PyTorch
(pytorch_env) PS E:\PyTorch_Build\pytorch> conda install -y pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch-nightly -c nvidia
3 channel Terms of Service accepted
Channels:
- pytorch-nightly
- nvidia
- defaults
- conda-forge
Platform: win-64
Collecting package metadata (repodata.json): done
Solving environment: failed
LibMambaUnsatisfiableError: Encountered problems while solving:
- package torchvision-0.20.0.dev20241112-py310_cu124 requires python >=3.10,<3.11.0a0, but none of the providers can d
- package pytorch-2.5.0.dev20240618-py3.11_cuda12.4_cudnn8_0 requires mkl 2021.4.*, but none of the providers can be d
- nothing provides pytorch 2.1.0.dev20230523 needed by torchaudio-2.1.0.dev20230523-py311_cu117
Could not solve for environment specs
The following packages are incompatible
├─ libuv =1.44 * is requested and can be installed;
├─ mkl ==2024.2.2 * is requested and can be installed;
├─ pin on python 3.13.* =* * is installable and it requires
│ └─ python =3.13 *, which can be installed;
├─ pytorch =* * is not installable because there are no viable options
│ ├─ pytorch [2.5.0.dev20240618|2.5.0.dev20240619] would require
│ │ └─ mkl =2021.4 *, which conflicts with any installable versions previously reported;
│ ├─ pytorch [2.5.0.dev20240618|2.5.0.dev20240619|2.5.0.dev20240730|2.5.0.dev20240731|2.6.0.dev20241111] would require
│ │ └─ mkl =2023.1 *, which conflicts with any installable versions previously reported;
│ ├─ pytorch 2.6.0.dev20241112 would require
│ │ ├─ libuv >=1.48.0,<2.0a0 *, which conflicts with any installable versions previously reported;
│ │ └─ mkl =2023.1 *, which conflicts with any installable versions previously reported;
│ └─ pytorch [1.0.1|1.10.2|...|2.7.1] conflicts with any installable versions previously reported;
├─ torchaudio =* * is not installable because there are no viable options
│ ├─ torchaudio 2.1.0.dev20230523 would require
│ │ └─ pytorch ==2.1.0.0dev20230523 *, which does not exist (perhaps a missing channel);
│ ├─ torchaudio 2.4.0.dev20240729 would require
│ │ └─ pytorch ==2.5.0.0dev20240726 *, which does not exist (perhaps a missing channel);
│ ├─ torchaudio 2.4.0.dev20240729 would require
│ │ └─ pytorch ==2.5.0.0dev20240729 *, which does not exist (perhaps a missing channel);
│ ├─ torchaudio 2.4.0.dev20240729 would require
│ │ └─ pytorch ==2.5.0.0dev20240728 *, which does not exist (perhaps a missing channel);
│ ├─ torchaudio [2.5.0.dev20241112|2.5.0.dev20241113|...|2.5.0.dev20241118] would require
│ │ └─ pytorch ==2.6.0.0dev20241112 *, which cannot be installed (as previously explained);
│ └─ torchaudio 2.5.1 conflicts with any installable versions previously reported;
└─ torchvision =* * is not installable because there are no viable options
├─ torchvision [0.20.0.dev20241112|0.20.0.dev20241113|...|0.20.0.dev20241118] would require
│ └─ python >=3.9,<3.10.0a0 *, which conflicts with any installable versions previously reported;
├─ torchvision [0.20.0.dev20241112|0.20.0.dev20241113|...|0.20.0.dev20241118] would require
│ └─ python >=3.10,<3.11.0a0 *, which conflicts with any installable versions previously reported;
├─ torchvision [0.20.0.dev20241112|0.20.0.dev20241113|...|0.20.0.dev20241118] would require
│ └─ python >=3.11,<3.12.0a0 *, which conflicts with any installable versions previously reported;
├─ torchvision [0.20.0.dev20241112|0.20.0.dev20241113|...|0.20.0.dev20241118] would require
│ └─ python >=3.12,<3.13.0a0 *, which conflicts with any installable versions previously reported;
└─ torchvision [0.11.3|0.13.1|...|0.22.0] conflicts with any installable versions previously reported.
Pins seem to be involved in the conflict. Currently pinned specs:
- python=3.13
(pytorch_env) PS E:\PyTorch_Build\pytorch>
(pytorch_env) PS E:\PyTorch_Build\pytorch> # 3. 安装补充依赖
(pytorch_env) PS E:\PyTorch_Build\pytorch> conda install -y pyyaml mkl mkl-include setuptools cmake cffi typing_extensions
3 channel Terms of Service accepted
Channels:
- defaults
- conda-forge
- nvidia
- pytorch-nightly
Platform: win-64
Collecting package metadata (repodata.json): done
Solving environment: done
## Package Plan ##
environment location: C:\Miniconda3
added / updated specs:
- cffi
- cmake
- mkl
- mkl-include
- pyyaml
- setuptools
- typing_extensions
The following packages will be downloaded:
package | build
---------------------------|-----------------
cmake-3.26.4 | h693b641_0 12.0 MB defaults
pyyaml-6.0.2 | py313h827c3e9_0 198 KB defaults
yaml-0.2.5 | he774522_0 62 KB defaults
------------------------------------------------------------
Total: 12.2 MB
The following NEW packages will be INSTALLED:
cmake pkgs/main/win-64::cmake-3.26.4-h693b641_0
pyyaml pkgs/main/win-64::pyyaml-6.0.2-py313h827c3e9_0
yaml pkgs/main/win-64::yaml-0.2.5-he774522_0
Downloading and Extracting Packages:
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
(pytorch_env) PS E:\PyTorch_Build\pytorch> python cuda_test.py
==================================================
PyTorch 版本: 2.6.0.dev20241112+cu121
CUDA 可用: True
CUDA 版本: 12.1
cuDNN 版本: 90100
E:\PyTorch_Build\pytorch\pytorch_env\lib\site-packages\torch\cuda\__init__.py:235: UserWarning:
NVIDIA GeForce RTX 5070 with CUDA capability sm_120 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_50 sm_60 sm_61 sm_70 sm_75 sm_80 sm_86 sm_90.
If you want to use the NVIDIA GeForce RTX 5070 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/
warnings.warn(
GPU 型号: NVIDIA GeForce RTX 5070
计算能力: (12, 0)
Traceback (most recent call last):
File "E:\PyTorch_Build\pytorch\cuda_test.py", line 25, in <module>
check_cuda()
File "E:\PyTorch_Build\pytorch\cuda_test.py", line 16, in check_cuda
a = torch.randn(1000, 1000, device='cuda')
RuntimeError: CUDA error: no kernel image is available for execution on the device
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
(pytorch_env) PS E:\PyTorch_Build\pytorch>
(pytorch_env) PS E:\PyTorch_Build\pytorch> # 创建新的虚拟环境
(pytorch_env) PS E:\PyTorch_Build\pytorch> python -m venv cuda_env
(pytorch_env) PS E:\PyTorch_Build\pytorch> .\cuda_env\Scripts\activate
(cuda_env) PS E:\PyTorch_Build\pytorch>
(cuda_env) PS E:\PyTorch_Build\pytorch> # 安装基础依赖
(cuda_env) PS E:\PyTorch_Build\pytorch> pip install numpy==1.26.4 ninja pyyaml mkl mkl-include setuptools cmake
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting numpy==1.26.4
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/19/77/538f202862b9183f54108557bfda67e17603fc560c384559e769321c9d92/numpy-1.26.4-cp310-cp310-win_amd64.whl (15.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 15.8/15.8 MB 34.6 MB/s eta 0:00:00
Collecting ninja
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/29/45/c0adfbfb0b5895aa18cec400c535b4f7ff3e52536e0403602fc1a23f7de9/ninja-1.13.0-py3-none-win_amd64.whl (309 kB)
Collecting pyyaml
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/b5/84/0fa4b06f6d6c958d207620fc60005e241ecedceee58931bb20138e1e5776/PyYAML-6.0.2-cp310-cp310-win_amd64.whl (161 kB)
Collecting mkl
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/91/ae/025174ee141432b974f97ecd2aea529a3bdb547392bde3dd55ce48fe7827/mkl-2025.2.0-py2.py3-none-win_amd64.whl (153.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 153.6/153.6 MB 24.2 MB/s eta 0:00:00
Collecting mkl-include
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/06/87/3eee37bf95c6b820b6394ad98e50132798514ecda1b2584c71c2c96b973c/mkl_include-2025.2.0-py2.py3-none-win_amd64.whl (1.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.3/1.3 MB 87.9 MB/s eta 0:00:00
Requirement already satisfied: setuptools in e:\pytorch_build\pytorch\cuda_env\lib\site-packages (65.5.0)
Collecting cmake
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/7c/d0/73cae88d8c25973f2465d5a4457264f95617c16ad321824ed4c243734511/cmake-4.1.0-py3-none-win_amd64.whl (37.6 MB)
Collecting tbb==2022.*
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/4e/d2/01e2a93f9c644585088188840bf453f23ed1a2838ec51d5ba1ada1ebca71/tbb-2022.2.0-py3-none-win_amd64.whl (420 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 420.6/420.6 kB ? eta 0:00:00
Collecting intel-openmp<2026,>=2024
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/89/ed/13fed53fcc7ea17ff84095e89e63418df91d4eeefdc74454243d529bf5a3/intel_openmp-2025.2.1-py2.py3-none-win_amd64.whl (34.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 34.0/34.0 MB 43.5 MB/s eta 0:00:00
Collecting tcmlib==1.*
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/91/7b/e30c461a27b97e0090e4db822eeb1d37b310863241f8c3ee56f68df3e76e/tcmlib-1.4.0-py2.py3-none-win_amd64.whl (370 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 370.3/370.3 kB ? eta 0:00:00
Collecting intel-cmplr-lib-ur==2025.2.1
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a8/70/938e81f58886fd4e114d5a5480d98c1396e73e40b7650f566ad0c4395311/intel_cmplr_lib_ur-2025.2.1-py2.py3-none-win_amd64.whl (1.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 72.4 MB/s eta 0:00:00
Collecting umf==0.11.*
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/33/a0/c8d755f08f50ddd99cb4a29a7e950ced7a0903cb72253e57059063609103/umf-0.11.0-py2.py3-none-win_amd64.whl (231 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 231.7/231.7 kB ? eta 0:00:00
Installing collected packages: tcmlib, mkl-include, umf, tbb, pyyaml, numpy, ninja, cmake, intel-cmplr-lib-ur, intel-openmp, mkl
Successfully installed cmake-4.1.0 intel-cmplr-lib-ur-2025.2.1 intel-openmp-2025.2.1 mkl-2025.2.0 mkl-include-2025.2.0 ninja-1.13.0 numpy-1.26.4 pyyaml-6.0.2 tbb-2022.2.0 tcmlib-1.4.0 umf-0.11.0
[notice] A new release of pip available: 22.3.1 -> 25.2
[notice] To update, run: python.exe -m pip install --upgrade pip
(cuda_env) PS E:\PyTorch_Build\pytorch>
(cuda_env) PS E:\PyTorch_Build\pytorch> # 安装 PyTorch Nightly
(cuda_env) PS E:\PyTorch_Build\pytorch> pip install --pre torch torchvision torchaudio `
>> --index-url https://download.pytorch.org/whl/nightly/cu121 `
>> --no-deps
Looking in indexes: https://download.pytorch.org/whl/nightly/cu121
Collecting torch
Using cached https://download.pytorch.org/whl/nightly/cu121/torch-2.6.0.dev20241112%2Bcu121-cp310-cp310-win_amd64.whl (2456.2 MB)
Collecting torchvision
Using cached https://download.pytorch.org/whl/nightly/cu121/torchvision-0.20.0.dev20241112%2Bcu121-cp310-cp310-win_amd64.whl (6.2 MB)
Collecting torchaudio
Using cached https://download.pytorch.org/whl/nightly/cu121/torchaudio-2.5.0.dev20241112%2Bcu121-cp310-cp310-win_amd64.whl (4.2 MB)
Installing collected packages: torchaudio, torchvision, torch
Successfully installed torch-2.6.0.dev20241112+cu121 torchaudio-2.5.0.dev20241112+cu121 torchvision-0.20.0.dev20241112+cu121
[notice] A new release of pip available: 22.3.1 -> 25.2
[notice] To update, run: python.exe -m pip install --upgrade pip
(cuda_env) PS E:\PyTorch_Build\pytorch>
(cuda_env) PS E:\PyTorch_Build\pytorch> # 安装补充依赖
(cuda_env) PS E:\PyTorch_Build\pytorch> pip install typing_extensions future six requests dataclasses
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting typing_extensions
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl (44 kB)
Collecting future
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/da/71/ae30dadffc90b9006d77af76b393cb9dfbfc9629f339fc1574a1c52e6806/future-1.0.0-py3-none-any.whl (491 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 491.3/491.3 kB 1.5 MB/s eta 0:00:00
Collecting six
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl (11 kB)
Collecting requests
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/1e/db/4254e3eabe8020b458f1a747140d32277ec7a271daf1d235b70dc0b4e6e3/requests-2.32.5-py3-none-any.whl (64 kB)
Collecting dataclasses
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/26/2f/1095cdc2868052dd1e64520f7c0d5c8c550ad297e944e641dbf1ffbb9a5d/dataclasses-0.6-py3-none-any.whl (14 kB)
Collecting charset_normalizer<4,>=2
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/e2/c6/f05db471f81af1fa01839d44ae2a8bfeec8d2a8b4590f16c4e7393afd323/charset_normalizer-3.4.3-cp310-cp310-win_amd64.whl (107 kB)
Collecting idna<4,>=2.5
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl (70 kB)
Collecting urllib3<3,>=1.21.1
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/a7/c2/fe1e52489ae3122415c51f387e221dd0773709bad6c6cdaa599e8a2c5185/urllib3-2.5.0-py3-none-any.whl (129 kB)
Collecting certifi>=2017.4.17
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/e5/48/1549795ba7742c948d2ad169c1c8cdbae65bc450d6cd753d124b17c8cd32/certifi-2025.8.3-py3-none-any.whl (161 kB)
Installing collected packages: dataclasses, urllib3, typing_extensions, six, idna, future, charset_normalizer, certifi, requests
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
torch 2.6.0.dev20241112+cu121 requires filelock, which is not installed.
torch 2.6.0.dev20241112+cu121 requires fsspec, which is not installed.
torch 2.6.0.dev20241112+cu121 requires jinja2, which is not installed.
torch 2.6.0.dev20241112+cu121 requires networkx, which is not installed.
torch 2.6.0.dev20241112+cu121 requires sympy==1.13.1; python_version >= "3.9", which is not installed.
Successfully installed certifi-2025.8.3 charset_normalizer-3.4.3 dataclasses-0.6 future-1.0.0 idna-3.10 requests-2.32.5 six-1.17.0 typing_extensions-4.15.0 urllib3-2.5.0
[notice] A new release of pip available: 22.3.1 -> 25.2
[notice] To update, run: python.exe -m pip install --upgrade pip
(cuda_env) PS E:\PyTorch_Build\pytorch>
(cuda_env) PS E:\PyTorch_Build\pytorch> # 运行验证脚本
(cuda_env) PS E:\PyTorch_Build\pytorch> python cuda_test.py
==================================================
PyTorch 版本: 2.6.0.dev20241112+cu121
CUDA 可用: True
CUDA 版本: 12.1
cuDNN 版本: 90100
E:\PyTorch_Build\pytorch\cuda_env\lib\site-packages\torch\cuda\__init__.py:235: UserWarning:
NVIDIA GeForce RTX 5070 with CUDA capability sm_120 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_50 sm_60 sm_61 sm_70 sm_75 sm_80 sm_86 sm_90.
If you want to use the NVIDIA GeForce RTX 5070 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/
warnings.warn(
GPU 型号: NVIDIA GeForce RTX 5070
计算能力: (12, 0)
Traceback (most recent call last):
File "E:\PyTorch_Build\pytorch\cuda_test.py", line 25, in <module>
check_cuda()
File "E:\PyTorch_Build\pytorch\cuda_test.py", line 16, in check_cuda
a = torch.randn(1000, 1000, device='cuda')
RuntimeError: CUDA error: no kernel image is available for execution on the device
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
(cuda_env) PS E:\PyTorch_Build\pytorch>