Closed Infinoid closed 5 months ago
I checked out the repo, commented out the relevant lines of jit.go, and tried to build it. I got a lot of warnings, and a new build error:
The build failure was:
# gorgonia.org/cu
./params.go:41:2: too few values in struct literal of type _Ctype_struct_CUDA_KERNEL_NODE_PARAMS_v2_st
The warnings can be summarized as follows:
handleCUDACB
cuModuleGetSurfRef
cuModuleGetTexRef
cuSurfRefGetArray
cuSurfRefSetArray
cuTexRefGetAddress_v2
cuTexRefGetAddressMode
cuTexRefGetArray
cuTexRefGetBorderColor
cuTexRefGetFilterMode
cuTexRefGetFlags
cuTexRefGetFormat
cuTexRefGetMaxAnisotropy
cuTexRefSetAddress_v2
cuTexRefSetAddress2D_v3
cuTexRefSetAddressMode
cuTexRefSetArray
cuTexRefSetBorderColor
cuTexRefSetFilterMode
cuTexRefSetFlags
cuTexRefSetFormat
cuTexRefSetMaxAnisotropy
cuTexRefSetMipmapFilterMode
cuTexRefSetMipmapLevelBias
cuTexRefSetMipmapLevelClamp
works with these changes:
diff --git a/jit.go b/jit.go
index 72df1b8..fa85ec2 100644
--- a/jit.go
diff --git a/jit.go b/jit.go
index 72df1b8..fa85ec2 100644
--- a/jit.go
+++ b/jit.go
@@ -135,8 +135,8 @@ const (
// JITTarget11 JITTargetOption = C.CU_TARGET_COMPUTE_11
// JITTarget12 JITTargetOption = C.CU_TARGET_COMPUTE_12
// JITTarget13 JITTargetOption = C.CU_TARGET_COMPUTE_13
- JITTarget20 JITTargetOption = C.CU_TARGET_COMPUTE_20
- JITTarget21 JITTargetOption = C.CU_TARGET_COMPUTE_21
+ // JITTarget20 JITTargetOption = C.CU_TARGET_COMPUTE_20
+ // JITTarget21 JITTargetOption = C.CU_TARGET_COMPUTE_21
JITTarget30 JITTargetOption = C.CU_TARGET_COMPUTE_30
JITTarget32 JITTargetOption = C.CU_TARGET_COMPUTE_32
JITTarget35 JITTargetOption = C.CU_TARGET_COMPUTE_35
diff --git a/params.go b/params.go
index 0938730..f91b5cc 100644
--- a/params.go
+++ b/params.go
@@ -38,6 +35,8 @@ func (p *KernelNodeParams) c() *C.CUDA_KERNEL_NODE_PARAMS {
C.uint(p.SharedMemBytes),
nil,
nil,
+ nil,
+ nil,
}
return retVal
}
you can add:
require gorgonia.org/cu v0.9.5-0.20240520013750-498bd6b70d43
to your go.mod, cuda 12 should work
Thanks for the fix. I am now able to follow the documented instructions, and install cudatest on Debian Trixie (go 1.22.3, gcc 13.2.0, cuda 12.2).
I am trying to build the
cudatest
program on Debian Trixie (testing) as the documentation suggests. It fails to build the cgo part due to missing symbols.versions
logs
to reproduce without breaking everything
Note:
alias docker=podman
if that's what you have; either one should work. And you don't need an actual GPU to build it.Also note: nvidia libs are kinda big. Make sure you have ~10GB of disk space available for this.