SWDEV-546287 - Implement hipLibrary load/unload (#975)

Этот коммит содержится в:
Jatin Chaudhary authored and GitHub committed 2025-09-19 22:23:49 +01:00
1 родитель 775ac73d25
Коммит e79eaaa8a5
26 files changed
+1175 -16

No files matched your search

+16
Просмотреть файл
@@ -0,0 +1,16 @@
#include <hip/hip_runtime.h>
extern "C" {
__global__ void add_kernel(float* out, float* a, float* b) {
size_t i = threadIdx.x;
out[i] = a[i] + b[i];
}
__global__ void sub_kernel(float* out, float* a, float* b) {
size_t i = threadIdx.x;
out[i] = a[i] - b[i];
}
__global__ void mul_kernel(float* out, float* a, float* b) {
size_t i = threadIdx.x;
out[i] = a[i] * b[i];
}
}