gorgonia / cu

package cu provides an idiomatic interface to the CUDA Driver API.
Apache License 2.0
470 stars 62 forks source link

cuda.h: No such file or directory // #include <cuda.h> #63

Open Francisundermoon opened 1 year ago

Francisundermoon commented 1 year ago

hello,fellows! when i ran command "go install gorgonia.org/cu/cmd/cudatest@latest",it cames out with an error of "E:\mygo\pkg\mod\gorgonia.org\cu@v0.9.4\addressing.go:3:11: fatal error: cuda.h: No such file or directory // #include ".i 've already installed cudatookit.what should i do?your help will be highly appreciated!tks

chewxy commented 1 year ago

Can you paste go env and where your CUDA toolkit was installed?

Francisundermoon commented 1 year ago

Can you paste go env and where your CUDA toolkit was installed?

The CUDA was installed in "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1", here is the result of excution of "go env":

set GO111MODULE=on set GOARCH=amd64 set GOBIN= set GOCACHE=C:\Users\Administrator\AppData\Local\go-build set GOENV=C:\Users\Administrator\AppData\Roaming\go\env set GOEXE=.exe set GOEXPERIMENT= set GOFLAGS= set GOHOSTARCH=amd64 set GOHOSTOS=windows set GOINSECURE= set GOMODCACHE=E:\mygo\pkg\mod set GONOPROXY= set GONOSUMDB= set GOOS=windows set GOPATH=E:\mygo set GOPRIVATE= set GOPROXY=https://goproxy.cn,direct set GOROOT=E:\mygo\go1.18.1 set GOSUMDB=sum.golang.org set GOTMPDIR= set GOTOOLDIR=E:\mygo\go1.18.1\pkg\tool\windows_amd64 set GOVCS= set GOVERSION=go1.18.1 set GCCGO=gccgo set GOAMD64=v1 set AR=ar set CC=gcc set CXX=g++ set CGO_ENABLED=1 set GOMOD=NUL set GOWORK= set CGO_CFLAGS=-g -O2 set CGO_CPPFLAGS= set CGO_CXXFLAGS=-g -O2 set CGO_FFLAGS=-g -O2 set CGO_LDFLAGS=-g -O2 set PKG_CONFIG=pkg-config set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\ADMINI~1\AppData\Local\Temp\go-build604214106=/tmp/go-build -gno-record-gcc-switches

chewxy commented 1 year ago

Ah, you are on CUDA12. Support for that and newer versions are coming soon

Francisundermoon commented 1 year ago

Ah, you are on CUDA12. Support for that and newer versions are coming soon

may i ask if i want to make it work properly, which version of cudatookit should i install?tks a lot

burstman commented 1 year ago

i have an AMD Radeon™ Vega 3 Graphics, i want to know if cuda can work with it?