blaze icon indicating copy to clipboard operation
blaze copied to clipboard

needs additional documentation to ease setup and build

Open omac777 opened this issue 3 years ago • 3 comments

Please add the following documentation to ease the setup and build steps. The build might fail if the docs subdirectory is missing source files. For a successful clone, build and check, the blaze users should do the following:

git clone https://github.com/Aandreba/blaze.git
git submodule update --recursive --init
make check

Thank you.

omac777 avatar Aug 23 '22 16:08 omac777

Also please add these steps or something similar.

Install opencl on pop 22.04:

wget -O '/tmp/rocm.gpg.key' 'https://repo.radeon.com/rocm/rocm.gpg.key'
sudo mv '/tmp/rocm.gpg.key' '/etc/apt/trusted.gpg.d/rocm.asc'
sync
echo 'deb https://repo.radeon.com/rocm/apt/latest/ ubuntu main' | sudo tee '/etc/apt/sources.list.d/rocm.list' > '/dev/null' && cat '/etc/apt/sources.list.d/rocm.list'
sudo apt update
sudo apt install rocm-opencl rocm-opencl-dev
sudo usermod --append --groups 'render,video' davidm
reboot

Create a new link to a version-less libOpenCL.so in the default 64bit lib path /usr/lib/x86_64-linux-gnu

cd /usr/lib/x86_64-linux-gnu
ln -s -T /opt/rocm-5.2.0/lib/libOpenCL.so.1.2 libOpenCL.so

Listing the new shared lib:

ls -lht libOpenCL.so
lrwxrwxrwx 1 root root  36 Aug 23 14:41 libOpenCL.so -> /opt/rocm-5.2.0/lib/libOpenCL.so.1.2

Tweak the Makefile to inform cargo to also use /usr/lib/x86_64-linux-gnu in its linker search path:

	RUSTFLAGS='-L /usr/lib/x86_64-linux-gnu' cargo check --no-default-features
	RUSTFLAGS='-L /usr/lib/x86_64-linux-gnu' cargo check --all-features
	RUSTFLAGS='-L /usr/lib/x86_64-linux-gnu' cargo test --no-default-features
	RUSTFLAGS='-L /usr/lib/x86_64-linux-gnu' cargo test --all-features

The above should help other users save a bit of time I hope.

omac777 avatar Aug 23 '22 18:08 omac777

git clone https://github.com/Aandreba/blaze.git
git submodule update --recursive --init
make check

This should probably be added to the README instead of the docs, but I agree it would be useful. As for the OpenCL installation guides, I think these fall outside of our responsibility.

Aandreba avatar Aug 29 '22 01:08 Aandreba

I just added the this docs to the main README and to the book

Aandreba avatar Aug 29 '22 01:08 Aandreba