Comments (12)
I assume this procedure was followed? https://github.com/dje-dev/Ceres/blob/main/BuildDLL.md
Key steps:
- Replace one c++ file in the LC0 distribution with the version in Ceres source code. Sorry, there is a typo in the instructions, it is network_cudnn.cc and not network_cuda.cc, taken from \src\Ceres.Chess\NNEvaluators\LC0DLL\network_cudnn.cc
- Change the c++ project file to output a DLL instead of EXE
Then build and copy the LC0.DLL to the appropriate directory (if not already there).
from ceres.
Thanks a lot for the answer, I actually did that and still have the same issue. I will double check. Thanks again.
from ceres.
@cyrenaique - I was having the same issues. I did this to get around the error:
-
Downloaded cudnn and changed my build paths to be cudnn for cudnn_path (previously I had it as the same as CUDA but then it didn't even use the network_cudnn.cc file in the build process...I could delete that file and it didn't care)
set CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2
set CUDNN_PATH=C:\Users\e\Downloads\cudnn-11.1-windows-x64-v8.0.5.39\cuda -
Commented out the "std::unique_ptr MakeCudaNetworkAuto" method declaration in the network_cuda.cc file. I just slapped a /* */ around it and also took out the 3 REGISTER_NETWORKS at the end..not sure that was needed . It was giving me a build error "Class already defined in src_neural_cuda_network_cudnn.cc.obj"
It seems to build for me now and now doesn't crash when i try "go nodes 10" like the setupexample....
Perhaps someone else has a better solution, or maybe there are some changes needed to the network_cuda.cc file as well that weren't included.
Good luck
from ceres.
You don't need to build the cuda backend at all, only the cudnn backend. Either edit meson_options.txt and change plain_cuda to false or add SET PLAIN_CUDA=false at the top of build.cmd. That gets rid of the clashes between the two files in src/neural/cuda.
Secondly the current dll build instructions are an unholy mess, partly because nVidia currently have cudnn files for cuda 11.1 but not for 11.2. Its perfectly possible to build lc0.dll just against 11.1 but it will only run if the user has cuda 11.1 libs installed or available runtimes.
from ceres.
Thanks for the info. I reverted my changes to network_cuda.cc to try @gsobala suggestions.
- add SET PLAIN_CUDA=false at the top of build.cmd --> this didn't seem to work...still got the clash on build
- tried to use CUDA\v11.1 instead of CUDA\v11.2 --> for me didn't detect cudnn-11.1 in that v11.1 CUDNN_PATH directory so I assume it would go back to having the missing entry point named 'Alloc' errors
- keep CUDNN_PATH pointed to cudnn-11.1 directory, edit meson_options.txt to change plain_cuda to false --> this worked, no clash, built fine
I think it makes sense to clarify the build instructions with these tips:
- Edit meson_options.txt to disable plain_cuda (if you get build clashes)
- Verify you see that "Library cudnn found: YES" when you run build.cmd (otherwise it isn't going to build the new files)
from ceres.
Thank you all for the clarifications. To be frank I don't understand these build issues very well. I will add the suggested tips.
The LC0.DLL code is not particularly clean or elegant (but does work flawlessly if you can get it to build). I have not invested a lot of time here because I'm hoping the LC0 developers will create an API to make the backends reusable by any engine, not just Ceres. They are a gem (very well tuned and run on many different types of hardware). If that happens, they will do so with a better design and better C++ project build skills than I have.
from ceres.
I followed eahova's steps and am receiving the same error. The only obvious difference is that I installed CUDA 11.2 because I do not have an older version of the installer. Library cudnn is found and I edited the meson_options.txt file. Is there anything else I should try?
from ceres.
I followed eahova's steps and am receiving the same error. The only obvious difference is that I installed CUDA 11.2 because I do not have an older version of the installer. Library cudnn is found and I edited the meson_options.txt file. Is there anything else I should try?
Are you getting the build error (code clash) or the runtime error (unable to find "alloc")?
from ceres.
from ceres.
You want to make sure it is compiling using the new network_cudnn.cc file. One thing to try is to make certain it is actually using the file in the build.
Go rename that file so it no longer exists as "network_cudnn.cc" and then rebuild the solution....if it still builds fine even without that file then you know what the problem is....
You might also want to verify that the cudnn directory is in your PATH so Visual Studios can find it....
from ceres.
Does anyone know the commit hash of the lc0 project where network_cudnn.cc was forked from? The diffs of the most current versions are rather substantial.
from ceres.
I got past that error with "network_cudnn.cc". However, I'm opening a new issue for a new problem I'm running into.
from ceres.
Related Issues (20)
- Ceres doesn't output a readyok (nibbler) HOT 1
- Ceres errors on long time control. System.ArgumentException: Allocation overflow HOT 3
- Engine incompatible with Cute Chess
- CUDA failed to initialize on Ubuntu HOT 4
- Support for 40x512 Lc0 networks HOT 1
- Unable to run with 40x512 networks. HOT 2
- Problem with new graphing option when Windows user directory includes spaces
- Ceres startet from a Power Automate Desktop flow HOT 1
- Please write some code so we can run Ceres on the new Mac Studio HOT 1
- PV still missing in 0.97RC3 for go nodes 1
- Arena unable to see GPU option HOT 1
- new networks don't work HOT 2
- How to install / compile Ceres on the MacBook Pro M1 Max? HOT 2
- Android port HOT 1
- Will this engine ever compete at TCEC or be merged into Leela? HOT 1
- two cards HOT 1
- Refuses to play to mate with tablebases enabled HOT 2
- Possible bug with setoption "SyzyzyPath"
- Why have tounament feature?
- Ceres dont work
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 ceres.