Comments (9)
This can be related:
I am working on windows support for Knet.jl. I tried to build CUDAdrv.jl
on windows and it uses discovery.jl
of CUDAapi.jl
. I realized that names
in this line should include nvcuda
but it is not there. I fixed it by manually adding it. If you can guide me, I can submit a PR for this.
from cudaapi.jl.
No, nvcuda
was already being searched for:
Line 9 in 31063fa
The problem was more complicated, see #10
The only thing I haven't been able to fix, is cl.exe
discovery. Even after (instructing the user to) source vcvarsall.bat
, I can't manage to deduce the location of cl.exe
from the environment variables. The heuristics @musm has added don't seem to work on Community 2017 anymore.
I'm thinking of just having the user put cl.exe
in his PATH, and be done with it. If there's no easy way to discover cl.exe
, we shouldn't be trying to:
Lines 293 to 298 in 58bcab6
from cudaapi.jl.
https://github.com/Microsoft/vswhere
is needed for newer vc studio installations, which is in included in the 2017 visual studio installation, and can be used to find CL.exe
CUDA 9 is required for VC2017 support
from cudaapi.jl.
Also see JuliaAttic/CUDArt.jl#70
from cudaapi.jl.
Right, but how do I get the actual path to cl.exe
from that. Sure, it'll help to find or activate a prompt with the VS vars sourced, but even in that prompt cl.exe
doesn't seem discoverable.
And yes, CUDAapi needs a compatibility database for matching VS versions to CUDA versions.
from cudaapi.jl.
vsdevcmd.bat has cl sourced (I just tried it)
https://github.com/Microsoft/vswhere/wiki/Find-VC
from cudaapi.jl.
Mine doesn't, I must be missing a part of VS then.
Can you confirm this picks up the path to cl.exe
?
vswhere = download("https://github.com/Microsoft/vswhere/releases/download/2.2.11/vswhere.exe")
vs_install_path = chomp(readstring(`$vswhere -latest -property installationPath`))
if !isdir(vs_install_path)
error("Cannot find a proper Visual Studio installation. Make sure Visual Studio is installed.")
end
vs_version_major = parse(split(chomp(readstring(`$vswhere -latest -property installationVersion`)), '.')[1])
if vs_version_major >= 15
vs_cmd_prompt = joinpath(vs_install_path, "VC", "Auxiliary", "Build", "vcvarsall.bat")
else
vs_cmd_prompt = joinpath(vs_install_path, "VC", "vcvarsall.bat")
end
# check whether 32 or 64 bit archtecture
# NOTE: Actually, nvcc in x86 visual studio command prompt doesn't make 32-bit binary
# It depends on whether CUDA toolkit is 32bit or 64bit
if Int == Int64
arch = "amd64"
else
arch = "x86"
end
run(`cmd /C "$vs_cmd_prompt" $arch \& where cl.exe`)
EDIT: yeah seems to work here after installing a boatload of VC++ tools. Figured I only needed the compiler, apparently not.
from cudaapi.jl.
@quaertym: the changes to CUDAapi in #10 should fix Windows support. What remains for Knet, from a quick first glance, is that the Knet package build scripts calls out to make
instead of building directly. But you can pretty easily recreate that in Julia, see e.g.: https://github.com/JuliaGPU/CUDArt.jl/blob/51ada407672d779ee11e69ad3cbd2642364b1330/deps/build.jl#L58-L77
(but don't use the logging_run
because I'll be removing that from CUDAapi)
from cudaapi.jl.
@maleadt Thanks. My problem was getting nvcuda.dll
without versions at the end. #10 seems like a fix.
from cudaapi.jl.
Related Issues (20)
- Remove warning HOT 3
- @runtime_ccall thread safety HOT 5
- find_cuda_library("cudnn",tk) returns nothing HOT 4
- could not load library: "C:\Users\USER\.julia\artifacts\~~~\bin\cudnn64_7.dll" HOT 2
- Could not find nvToolsExt (libnvToolsExt.dylib.1.0 or libnvToolsExt.dylib.1) in /Users/imac/.julia/artifacts/b502baf54095dff4a69fd6aba8667124583f6929/lib HOT 1
- ERROR: Could not find a suitable GCC HOT 4
- Unable to find cudnn HOT 9
- Cannot find cuDNN that was installed via anaconda (without sudo) HOT 4
- Fix hardcoded CUDA versions to folder name autodetection? HOT 2
- macOS CI for CUDA 10+ HOT 1
- CI does not spot: libcudadevrt.lib is actually cudadevrt.lib on windows HOT 4
- find_library word_size
- Longer term goal with other CUDA libraries HOT 4
- Finding 8.0 files instead of 10.1 ones HOT 5
- CUDA discovery failing with 1.3.0-rc1 HOT 1
- Discovery fails if CUDA env vars are set to empty variable HOT 2
- Float64 HOT 1
- CUDA version warning throws MethodError: no method matching version()
- Sort paths from CUDAapi.find_toolkit() in the descending order? HOT 2
- find_host_compiler was removed, but is still exported
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cudaapi.jl.