Mayo commited on
fix!: require CUDA compute cap 8.0
Browse files
README.md
CHANGED
|
@@ -140,7 +140,7 @@ Koharu bundles CUDA Toolkit 13.0. The required DLLs are extracted to the applica
|
|
| 140 |
|
| 141 |
#### Supported NVIDIA GPUs
|
| 142 |
|
| 143 |
-
Koharu supports NVIDIA GPUs with compute capability
|
| 144 |
|
| 145 |
For GPU compatibility references, see [CUDA GPU Compute Capability](https://developer.nvidia.com/cuda-gpus).
|
| 146 |
|
|
|
|
| 140 |
|
| 141 |
#### Supported NVIDIA GPUs
|
| 142 |
|
| 143 |
+
Koharu supports NVIDIA GPUs with compute capability 8.0 or higher.
|
| 144 |
|
| 145 |
For GPU compatibility references, see [CUDA GPU Compute Capability](https://developer.nvidia.com/cuda-gpus).
|
| 146 |
|
docs/en-US/explanation/acceleration-and-runtime.md
CHANGED
|
@@ -10,7 +10,7 @@ Koharu supports multiple runtime backends so the same pipeline can run across a
|
|
| 10 |
|
| 11 |
CUDA is the primary GPU backend on systems with supported NVIDIA hardware.
|
| 12 |
|
| 13 |
-
- Koharu supports NVIDIA GPUs with compute capability
|
| 14 |
- Koharu bundles CUDA toolkit 13.0
|
| 15 |
|
| 16 |
On first run, Koharu extracts the required dynamic libraries into the application data directory.
|
|
|
|
| 10 |
|
| 11 |
CUDA is the primary GPU backend on systems with supported NVIDIA hardware.
|
| 12 |
|
| 13 |
+
- Koharu supports NVIDIA GPUs with compute capability 8.0 or higher
|
| 14 |
- Koharu bundles CUDA toolkit 13.0
|
| 15 |
|
| 16 |
On first run, Koharu extracts the required dynamic libraries into the application data directory.
|
docs/ja-JP/explanation/acceleration-and-runtime.md
CHANGED
|
@@ -10,7 +10,7 @@ Koharu は複数のランタイム経路を備えており、幅広いハード
|
|
| 10 |
|
| 11 |
CUDA は、対応する NVIDIA ハードウェアを持つ環境での主な GPU アクセラレーション経路です。
|
| 12 |
|
| 13 |
-
- Koharu は compute capability
|
| 14 |
- Koharu は CUDA Toolkit 13.0 を同梱しています
|
| 15 |
|
| 16 |
初回実行時には、必要な動的ライブラリがアプリケーションデータディレクトリへ展開されます。
|
|
|
|
| 10 |
|
| 11 |
CUDA は、対応する NVIDIA ハードウェアを持つ環境での主な GPU アクセラレーション経路です。
|
| 12 |
|
| 13 |
+
- Koharu は compute capability 8.0 以上の NVIDIA GPU をサポートします
|
| 14 |
- Koharu は CUDA Toolkit 13.0 を同梱しています
|
| 15 |
|
| 16 |
初回実行時には、必要な動的ライブラリがアプリケーションデータディレクトリへ展開されます。
|
docs/pt-BR/explanation/acceleration-and-runtime.md
CHANGED
|
@@ -10,7 +10,7 @@ O Koharu suporta múltiplos backends de runtime para que a mesma pipeline possa
|
|
| 10 |
|
| 11 |
CUDA é o backend principal de GPU em sistemas com hardware NVIDIA suportado.
|
| 12 |
|
| 13 |
-
- O Koharu suporta GPUs NVIDIA com compute capability
|
| 14 |
- O Koharu empacota o CUDA toolkit 13.0
|
| 15 |
|
| 16 |
Na primeira execução, o Koharu extrai as bibliotecas dinâmicas necessárias para o diretório de dados do aplicativo.
|
|
|
|
| 10 |
|
| 11 |
CUDA é o backend principal de GPU em sistemas com hardware NVIDIA suportado.
|
| 12 |
|
| 13 |
+
- O Koharu suporta GPUs NVIDIA com compute capability 8.0 ou superior
|
| 14 |
- O Koharu empacota o CUDA toolkit 13.0
|
| 15 |
|
| 16 |
Na primeira execução, o Koharu extrai as bibliotecas dinâmicas necessárias para o diretório de dados do aplicativo.
|
docs/zh-CN/explanation/acceleration-and-runtime.md
CHANGED
|
@@ -10,7 +10,7 @@ Koharu 支持多条运行时路径,因此可以在不同类型的硬件上运
|
|
| 10 |
|
| 11 |
CUDA 是在支持的 NVIDIA 硬件上最主要的 GPU 加速路径。
|
| 12 |
|
| 13 |
-
- Koharu 支持计算能力
|
| 14 |
- Koharu 内置 CUDA Toolkit 13.0
|
| 15 |
|
| 16 |
首次运行时,所需的动态库会被解压到应用数据目录中。
|
|
|
|
| 10 |
|
| 11 |
CUDA 是在支持的 NVIDIA 硬件上最主要的 GPU 加速路径。
|
| 12 |
|
| 13 |
+
- Koharu 支持计算能力 8.0 及以上的 NVIDIA GPU
|
| 14 |
- Koharu 内置 CUDA Toolkit 13.0
|
| 15 |
|
| 16 |
首次运行时,所需的动态库会被解压到应用数据目录中。
|
koharu-runtime/src/cuda.rs
CHANGED
|
@@ -14,7 +14,7 @@ const CUDA_13_1_DRIVER_VERSION: i32 = 13010;
|
|
| 14 |
const CUDA_EXTRACT_REVISION: u32 = 2;
|
| 15 |
const CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR: i32 = 75;
|
| 16 |
const CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR: i32 = 76;
|
| 17 |
-
const MIN_COMPUTE_CAPABILITY: (i32, i32) = (
|
| 18 |
|
| 19 |
type CuInit = unsafe extern "C" fn(flags: u32) -> i32;
|
| 20 |
type CuDriverGetVersion = unsafe extern "C" fn(driver_version: *mut i32) -> i32;
|
|
@@ -158,7 +158,7 @@ pub fn driver_version() -> Result<CudaDriverVersion> {
|
|
| 158 |
|
| 159 |
/// Query the compute capability of CUDA device 0.
|
| 160 |
///
|
| 161 |
-
/// Returns `(major, minor)` e.g. `(
|
| 162 |
pub fn compute_capability() -> Result<(i32, i32)> {
|
| 163 |
let library_name = if cfg!(target_os = "windows") {
|
| 164 |
"nvcuda.dll"
|
|
@@ -245,7 +245,7 @@ pub fn check_cuda_driver_support() -> bool {
|
|
| 245 |
}
|
| 246 |
}
|
| 247 |
|
| 248 |
-
// Check GPU compute capability (need >=
|
| 249 |
match compute_capability() {
|
| 250 |
Ok((major, minor)) if (major, minor) >= MIN_COMPUTE_CAPABILITY => {
|
| 251 |
tracing::info!("GPU compute capability: {major}.{minor}");
|
|
@@ -254,7 +254,7 @@ pub fn check_cuda_driver_support() -> bool {
|
|
| 254 |
Ok((major, minor)) => {
|
| 255 |
tracing::warn!(
|
| 256 |
"GPU compute capability {major}.{minor} is below the minimum \
|
| 257 |
-
required {}.{}; falling back to CPU.
|
| 258 |
newer GPU is required for GPU acceleration.",
|
| 259 |
MIN_COMPUTE_CAPABILITY.0,
|
| 260 |
MIN_COMPUTE_CAPABILITY.1,
|
|
|
|
| 14 |
const CUDA_EXTRACT_REVISION: u32 = 2;
|
| 15 |
const CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR: i32 = 75;
|
| 16 |
const CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR: i32 = 76;
|
| 17 |
+
const MIN_COMPUTE_CAPABILITY: (i32, i32) = (8, 0); // Ampere (RTX 30xx) and above
|
| 18 |
|
| 19 |
type CuInit = unsafe extern "C" fn(flags: u32) -> i32;
|
| 20 |
type CuDriverGetVersion = unsafe extern "C" fn(driver_version: *mut i32) -> i32;
|
|
|
|
| 158 |
|
| 159 |
/// Query the compute capability of CUDA device 0.
|
| 160 |
///
|
| 161 |
+
/// Returns `(major, minor)` e.g. `(8, 0)` for Ampere, `(8, 9)` for Ada.
|
| 162 |
pub fn compute_capability() -> Result<(i32, i32)> {
|
| 163 |
let library_name = if cfg!(target_os = "windows") {
|
| 164 |
"nvcuda.dll"
|
|
|
|
| 245 |
}
|
| 246 |
}
|
| 247 |
|
| 248 |
+
// Check GPU compute capability (need >= 8.0 / Ampere)
|
| 249 |
match compute_capability() {
|
| 250 |
Ok((major, minor)) if (major, minor) >= MIN_COMPUTE_CAPABILITY => {
|
| 251 |
tracing::info!("GPU compute capability: {major}.{minor}");
|
|
|
|
| 254 |
Ok((major, minor)) => {
|
| 255 |
tracing::warn!(
|
| 256 |
"GPU compute capability {major}.{minor} is below the minimum \
|
| 257 |
+
required {}.{}; falling back to CPU. An Ampere (RTX 30xx) or \
|
| 258 |
newer GPU is required for GPU acceleration.",
|
| 259 |
MIN_COMPUTE_CAPABILITY.0,
|
| 260 |
MIN_COMPUTE_CAPABILITY.1,
|