Fresh install of CL 38700 is really snappy. Thank you CL devs

I have two monitors on either side in portrait orientation. With the previous CL install, when I change the display settings to the portrait mode from landscape, the screens flicker, goes blank for about half a second before lighting up. Now, the mode change is instant and no flickering.

Your Mandelbrot program is a good benchmarking program for CL :smiley: Your AMD 3970X is a beast!! My PC is switched off when I am at work. I can loan it to you if you want to test software during that time.

1 Like

I finished learning Codon, the Python-like language that compiles to machine code.

Today, I finished new additions to my Perl MCE Sandbox repository. The OpenMP and Codon variants reside in the examples folder.

Thank you, @Indy for introducing us to Codon.

1 Like

You are welcome, @marioroy. I will try running your code sometime!

I want to ask a noob question. Hope you don’t mind. I got stuck with CUDA when running kohya_ss GitHub project. It complained about missing library file, which I, cannot remember now.

After CUDA installation I added PATH to the ~/.profile but did not work i.e. running nvcc --version command. Adding it to ~/.bashrc however worked. I also added the CUDA library path to LD_LIBRARY_PATH, but still complained. I wish I knew a bit more how to fix broken links in Linux. I ended up running kohya_ss on Pop_OS in the end and it runs flawlessly. This broken link may be related to pyenv I installed to ‘downgrade’ the python version in CL as the system python version is newer than 3.10. On the other hand Pop_OS has 3.10.12 so pyenv is not required.

If you are keen to know the exact details, I will have to install CL from scratch but happy to do it if it helps to make changes to nvidia-driver-on-clear-linux project.

Thank you.

Installed CL, Nvidia driver, and CUDA, and ran kohya_ss. The error log is as follows. P.S. I avoided pyenv just in case and installed a conda environment with python3.10.11

/home/indy/kohya_ss/venv/lib/python3.10/site-packages/bitsandbytes/cuda_setup/main.py:166: UserWarning: Welcome to bitsandbytes. For bug reports, please run

python -m bitsandbytes


  warn(msg)
================================================================================
/home/indy/kohya_ss/venv/lib/python3.10/site-packages/bitsandbytes/cuda_setup/main.py:166: UserWarning: /home/indy/anaconda3/envs/myenv did not contain ['libcudart.so', 'libcudart.so.11.0', 'libcudart.so.12.0'] as expected! Searching further paths...
  warn(msg)
The following directories listed in your path were found to be non-existent: {PosixPath('/home/indy/kohya_ss/venv/lib/python3.10/site-packages/cv2/../../lib64')}
/home/indy/kohya_ss/venv/lib/python3.10/site-packages/bitsandbytes/cuda_setup/main.py:166: UserWarning: /home/indy/kohya_ss/venv/lib/python3.10/site-packages/cv2/../../lib64: did not contain ['libcudart.so', 'libcudart.so.11.0', 'libcudart.so.12.0'] as expected! Searching further paths...
  warn(msg)
The following directories listed in your path were found to be non-existent: {PosixPath('@/tmp/.ICE-unix/1346,unix/clr-0053f445131940bbabb6061ecceedd3c'), PosixPath('local/clr-0053f445131940bbabb6061ecceedd3c')}
The following directories listed in your path were found to be non-existent: {PosixPath('/usr/lib64/libmpi.so')}
The following directories listed in your path were found to be non-existent: {PosixPath('/usr/lib/jvm/java-1.19.0/include')}
The following directories listed in your path were found to be non-existent: {PosixPath('/etc/xdg')}
The following directories listed in your path were found to be non-existent: {PosixPath('/usr/bin/mpicc')}
The following directories listed in your path were found to be non-existent: {PosixPath('/org/gnome/Terminal/screen/4b648122_4848_45c1_aee4_37fc6d816e5c')}
The following directories listed in your path were found to be non-existent: {PosixPath('gnome-shell/Terminal/1370-6-clr-0053f445131940bbabb6061ecceedd3c_TIME3884684')}
CUDA_SETUP: WARNING! libcudart.so not found in any environmental path. Searching in backup paths...
DEBUG: Possible options found for libcudart.so: {PosixPath('/usr/local/cuda/lib64/libcudart.so')}
CUDA SETUP: PyTorch settings found: CUDA_VERSION=118, Highest Compute Capability: 8.9.
CUDA SETUP: To manually override the PyTorch CUDA version please see:https://github.com/TimDettmers/bitsandbytes/blob/18e827d666fa2b70a12d539ccedc17aa51b2c97c/how_to_use_nonpytorch_cuda.md
CUDA SETUP: Loading binary /home/indy/kohya_ss/venv/lib/python3.10/site-packages/bitsandbytes/libbitsandbytes_cuda118.so...
libcusparse.so.11: cannot open shared object file: No such file or directory
CUDA SETUP: Something unexpected happened. Please compile from source:
git clone https://github.com/TimDettmers/bitsandbytes.git
cd bitsandbytes
CUDA_VERSION=118 make cuda11x
python setup.py install

It appears to me that so many links are broken to various libraries. Not sure of the best way to go about fixing it.

Tried compiling bitsandbytes.

(myenv) indy@mlrig~/kohya_ss/bitsandbytes (main) $ CUDA_VERSION=118 make cuda11x
mkdir -p build
mkdir -p dependencies
ENVIRONMENT
============================
CUDA_VERSION: 118
============================
NVCC path: /opt/cuda/bin/nvcc
GPP path: /usr/bin/g++ VERSION: g++ (Clear Linux OS for Intel Architecture) 13.2.1 20230824 releases/gcc-13.2.0-140-g74e3194675
CUDA_HOME: /opt/cuda
CONDA_PREFIX: /home/indy/anaconda3/envs/myenv
PATH: /home/indy/anaconda3/envs/myenv/bin:/home/indy/anaconda3/condabin:/usr/bin/haswell:/usr/local/bin:/usr/bin:/opt/3rd-party/bin:/opt/cuda/bin
LD_LIBRARY_PATH: 
============================
/opt/cuda/bin/nvcc -gencode arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -Xcompiler '-fPIC' --use_fast_math -Xptxas=-v -dc /home/indy/kohya_ss/bitsandbytes/csrc/ops.cu /home/indy/kohya_ss/bitsandbytes/csrc/kernels.cu -I /opt/cuda/include -I /home/indy/kohya_ss/bitsandbytes/csrc -I /home/indy/anaconda3/envs/myenv/include -I /home/indy/kohya_ss/bitsandbytes/include -L /opt/cuda/lib64 -lcudart -lcublas -lcublasLt -lcusparse -L /home/indy/anaconda3/envs/myenv/lib --output-directory /home/indy/kohya_ss/bitsandbytes/build
In file included from /opt/cuda/include/cuda_runtime.h:82,
                 from <command-line>:
/opt/cuda/include/crt/host_config.h:143:2: error: #error -- unsupported GNU version! gcc versions later than 12 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
  143 | #error -- unsupported GNU version! gcc versions later than 12 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
      |  ^~~~~
make: *** [Makefile:99: cuda11x] Error 1

So, I am better off with Pop_OS to run kohya_ss :laughing: I will keep the CL install in my spare drive anyway. I think the CL 6.5 kernel will be out soon.

I found a solution to this madness :smiling_face_with_three_hearts:

What you want is a supported C compiler or nvcc will complain. It turns out there are a couple of ways to do this.

Specify the gcc compiler to use by setting an environment variable.

sudo swupd bundle-add c-extras-gcc11

Add NVCC_PREPEND_FLAGS to your bash profile.
NVCC_PREPEND_FLAGS=-ccbin=/usr/bin/gcc-11

Build bitsandbytes
CUDA_VERSION=118 make cuda11x

Another suggestion is setting a default compiler for nvcc by making a symbolic link to the internal dir of cuda. This works too and not need to set NVCC_PREPEND_FLAGS.

sudo swupd bundle-add c-extras-gcc11
sudo ln -s /usr/bin/gcc-11 /opt/cuda/bin/gcc

Build bitsandbytes
CUDA_VERSION=118 make cuda11x

I will update install-cuda in my repo to install the c-extras-gcc11 bundle and make the symbolic link.

1 Like

I’m not sure how folks install CUDA if other than the provided install-cuda script. The reason is that folks should not experience a CUDA library not found message.

WARNING! libcudart.so not found in any environmental path

Ensure the CUDA_HOME environment is set, which install-cuda adds to /etc/environment.d/10-nvidia-cuda.conf. I updated the script to install the c-extras-gcc11 bundle, if missing, and make the symbolic link to gcc-11.

sudo ln -sf /usr/bin/gcc-11 /opt/cuda/bin/gcc

I wish CL NVIDIA users the best. I’m venturing to other exciting things in my life. The repo has been in archive state for some time, hinting that I will no longer be maintaining it.

1 Like

I can’t thank you enough @marioroy!

I always use your CUDA-install-auto script. I wish you all the best in your new venture. Hoping you would update the repo once in a while :blush: Your repo will be a goldmine when I start learning scripting eventually.