From 119e0e58361223bf59c06e9dbef1f4c5080c6dbd Mon Sep 17 00:00:00 2001 From: HiddenPeak <118246850+HiddenPeak@users.noreply.github.com> Date: Sat, 4 Jan 2025 12:50:40 -0800 Subject: [PATCH] Update compute_cap.rs add Jetson Orin support --- backends/candle/src/compute_cap.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/backends/candle/src/compute_cap.rs b/backends/candle/src/compute_cap.rs index ac79fcf1..bf1fbf93 100644 --- a/backends/candle/src/compute_cap.rs +++ b/backends/candle/src/compute_cap.rs @@ -28,6 +28,7 @@ fn compute_cap_matching(runtime_compute_cap: usize, compile_compute_cap: usize) (75, 75) => true, (80..=89, 80) => true, (86..=89, 80..=86) => true, + (87, 87) => true, // 新增 87 的支持 (89, 89) => true, (90, 90) => true, (_, _) => false, @@ -58,6 +59,7 @@ mod tests { assert!(compute_cap_matching(86, 80)); assert!(compute_cap_matching(89, 80)); assert!(compute_cap_matching(89, 86)); + assert!(compute_cap_matching(87, 87)); // 新增 87 的测试用例 assert!(!compute_cap_matching(75, 80)); assert!(!compute_cap_matching(75, 86)); @@ -80,5 +82,11 @@ mod tests { assert!(!compute_cap_matching(90, 80)); assert!(!compute_cap_matching(90, 86)); assert!(!compute_cap_matching(90, 89)); + + assert!(!compute_cap_matching(87, 75)); // 新增 87 的测试用例 + assert!(!compute_cap_matching(87, 80)); + assert!(!compute_cap_matching(87, 86)); + assert!(!compute_cap_matching(87, 89)); + assert!(!compute_cap_matching(87, 90)); } }