You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2ad5e16
Browse filesBrowse the repository at this point in the historyBrowse files
The CUDA backend page and the getting started page said several things
that the TensorRT page, and the code, contradict:
- The CUDA page said the Python runtime allocates host memory for an
unplanned output, so a method that keeps its outputs on the GPU could not
run from Python. The Python runtime allocates device memory for it and
returns it without a copy. So the page now leaves both inputs and outputs
unplanned, like the TensorRT page and the PropagateDeviceConfig
docstring, because that copies the least. A planned output lives in the
method's memory, which the next run overwrites, and the Python runtime
copies it on every call unless clone_outputs=False. The C++ example now
shows Module::set_output.
- It said a planned input fed with GPU memory makes an undefined host
memcpy and crashes, and so did the PropagateDeviceConfig docstring. The
runtime refuses that copy and the call fails with NotSupported.
- It asked for a CUDA 11.x or later toolkit to run a model. The prebuilt
packages use CUDA 13 and bring the CUDA runtime with them on Linux. On
Windows the runtime comes from a CUDA 13 toolkit. A build from source also
supports CUDA 12.6. The toolkit is needed for export, where nvcc compiles
the kernels. The driver line now asks for a driver that supports that CUDA
version. The page also gave no minimum GPU, while the packages are built
for compute capability 8.0 and newer, and it asked for Python 3.8+, while
the package needs 3.11 to 3.15.
- It listed Windows without saying that programs for Windows are exported
on Linux and run from C++. It now links to the C++ guide section that
shows how. Its link to the getting started page was also broken.
- The PropagateDeviceConfig field comments said a dict on a skip flag sets
per-method values. Only a dict of configs on the outer
ExecutorchBackendConfig field does, as the CUDA page says.
- The getting started page said to use the CPU packages on Windows, while
CUDA packages are built for Windows too, and it called CUDA 13.4 nightly
only. It now also says that on Windows they run from C++, and that
programs for the CUDA backend are exported on Linux.
-**Hardware**: NVIDIA GPU with compute capability 8.0 (Ampere) or newer. This is the floor the
18
+
prebuilt packages are built for.
19
+
-**CUDA**: 13 for the prebuilt packages. On Linux they bring the CUDA runtime with them. On
20
+
Windows it comes from a CUDA 13 toolkit install. A build from source also supports CUDA 12.6.
21
+
-**Operating System**: Linux, or Windows from C++ for programs exported on Linux (see
22
+
[CUDA on Windows](../../using-executorch-cpp.md#cuda-on-windows))
23
+
-**Drivers**: An NVIDIA driver that supports the CUDA version you use: CUDA 13 for the prebuilt
24
+
packages.
21
25
22
26
## Development Requirements
23
27
24
28
To develop and export models using the CUDA backend:
25
29
26
-
-**Python**: Python 3.8+
30
+
-**Python**: Python 3.11 to 3.15
27
31
-**PyTorch**: PyTorch with CUDA support
32
+
-**CUDA Toolkit**: export compiles kernels with `nvcc`, the CUDA compiler, so it needs a CUDA toolkit
28
33
-**ExecuTorch**: Install ExecuTorch with CUDA backend support
29
34
30
35
## Using the CUDA Backend
@@ -83,7 +88,7 @@ For a complete working example, see the [CUDA export script](https://github.com/
83
88
84
89
## Runtime Integration
85
90
86
-
To run the model on device, use the standard ExecuTorch runtime APIs. See [Running on Device](getting-started.md#running-on-device) for more information.
91
+
To run the model on device, use the standard ExecuTorch runtime APIs. See [Running on Device](../../getting-started.md#running-on-device) for more information.
87
92
88
93
When building from source, pass `-DEXECUTORCH_BUILD_CUDA=ON` when configuring the CMake build to compile the CUDA backend.
0 commit comments