Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
writing an ebuild for llama.cpp, tests with cuda fail
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Arniiiii
n00b
n00b


Joined: 14 Jan 2025
Posts: 4
Location: Ukraine

PostPosted: Sun Feb 09, 2025 11:27 am    Post subject: writing an ebuild for llama.cpp, tests with cuda fail Reply with quote

Hello.

This started from a discord guy asking for a ebuild for llama.cpp at gentoo's discord : https://discord.gg/gentoolinux https://discord.com/channels/249111029668249601/1335943645052014602

I'm trying to write an ebuild for llama.cpp ( https://github.com/ggerganov/llama.cpp ) :
https://github.com/Arniiiii/ex_repo/blob/master/dev-cpp/llama-cpp/llama-cpp-0_pre4676.ebuild .

There's a problem:

if `USE=cuda`, tests fail with error like "failed to initialize CUDA: OS call failed or operation not supported on this OS" : test log: https://paste.gentoo.zip/cQhxxPaF .

But a first failed test passes just fine when run as root : https://paste.gentoo.zip/mz3vZ4Vo

Full build.log : https://paste.gentoo.zip/n4VbzZw2
emerge --info : https://paste.gentoo.zip/WTPVC1mz

I've tried searching for ebuild that use `cuda` eclass and took some lines from pycuda from src_test() , but it didn't help.
I've tried searching the error at bugs.gentoo.org , the forum and just in the Internet , however I didn't found something related/helpful

Looks like sandbox / permission issue.

I use my ebuild in the way to test:

Code:
cat /home/paxu/data/code/experiments/ex_repo/a_file.cmake

Code:
set(CMAKE_CUDA_ARCHITECTURES "89" CACHE STRING "you know" FORCE)

Code:
CMAKE_EXTRA_CACHE_FILE="/home/paxu/data/code/experiments/ex_repo/a_file.cmake" NVCC_CCBIN='/usr/bin/gcc-13' FEATURE="test" USE="-hip -hip_no_vmm cuda_force_cublas test examples server" ebuild ./dev-cpp/llama-cpp/llama-cpp-0_pre4676.ebuild clean test install


I would be pleased to get any recommendation.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum