okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

Niko1221Merge f-142c-small into f-142407ea8192

main
1.2 KiB26 linesraw
1--- pristine-0.1.40.4/include/strata/hip_compat/cublas_v2.h	2026-10-08 13:23:15.000000000 +0800
2+++ /home/user/Strata/.bench/0.1.40.4/include/strata/hip_compat/cublas_v2.h	2026-10-09 20:39:39.768455736 +0800
3@@ -1,4 +1,10 @@
4 #pragma once
5+// 本地补丁(社区基准报告):ROCm 6.2 的 hipBLAS 2.2 要定义 HIPBLAS_V2 才暴露新版
6+// hipDataType / HIPBLAS_COMPUTE_32F 接口;0.1.39 的兼容头有这一行,0.1.40.x 删掉了
7+// (它假设 ROCm 7)。不加会报 "no known conversion from 'hipDataType' to 'hipblasDatatype_t'"。
8+#ifndef HIPBLAS_V2
9+#define HIPBLAS_V2
10+#endif
11 #include <hipblas/hipblas.h>
12 #include <hipblas/hipblas-version.h>
13 
14@@ -55,6 +61,12 @@
15 #define cublasHandle_t hipblasHandle_t
16 #define cublasSetMathMode hipblasSetMathMode
17 #define cublasSetStream hipblasSetStream
18+// 本地补丁(社区基准报告):hipBLAS 2.2(ROCm 6.2)没有 hipblasSetWorkspace,这个 API
19+// 是更新版本才有的。像 0.1.39 的兼容头一样接受并忽略——workspace 由 hipBLAS 自己管理。
20+#if hipblasVersionMajor < 3
21+#define cublasSetWorkspace(handle, ptr, bytes) HIPBLAS_STATUS_SUCCESS
22+#else
23 #define cublasSetWorkspace hipblasSetWorkspace
24+#endif
25 #define cublasStatus_t hipblasStatus_t
26 #endif