New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distribute nvrtc.dll with windows binaries #39

Closed
ifdefelse opened this Issue Jan 4, 2019 · 6 comments

Comments

Projects
None yet
5 participants
@ifdefelse
Copy link

ifdefelse commented Jan 4, 2019

Follow up from the meeting today. The ProgPoW portion of ethminer doesn't require the full CUDA SDK to be installed on the client. Only these two files are needed:
nvrtc.dll, nvrtc-builtins.dll

These files are explicitly listed as distributable in the CUDA EULA:
https://docs.nvidia.com/cuda/eula/index.html#attachment-a

When creating a windows binary to distribute these should be copied from the SDK used to build and included in the package.

@AndreaLanfranchi

This comment has been minimized.

Copy link
Owner

AndreaLanfranchi commented Jan 4, 2019

Thank you very much. I appreciate. Will look into it.

@ifdefelse

This comment has been minimized.

Copy link

ifdefelse commented Jan 4, 2019

@hackmod this probably also applies to your packages

@StefanOberhumer

This comment has been minimized.

Copy link
Collaborator

StefanOberhumer commented Jan 4, 2019

As info:
On my ubuntu based linux rigs I had to install cuda-nvrtc-9-0 cuda-nvrtc-dev-9-0

Following should be adaptable for other NV versions:

wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.0.176-1_amd64.deb
dpkg -i cuda-repo-ubuntu1604_9.0.176-1_amd64.deb
apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
apt-get -qy update
apt-get -qy install cuda-nvrtc-9-0 cuda-nvrtc-dev-9-0
@naikmyeong

This comment has been minimized.

Copy link

naikmyeong commented Jan 5, 2019

Applying them on travis & appveyor would be appreciated.

@ifdefelse

This comment has been minimized.

Copy link

ifdefelse commented Jan 10, 2019

I thought the linux binaries were statically linked, so shouldn't require you to install cuda-nvrtc. If that's not the case then libnvrtc.so and libnvrtc-builtins.so should also be distributed with the linux binaries.

@hackmod

This comment has been minimized.

Copy link

hackmod commented Jan 10, 2019

Nvidia does not provide libnvrtc*.a, so ldd reports like as follow.

$ ldd ethminer/build/ethminer/ethminer
        linux-vdso.so.1 =>  (0x00007ffe85da6000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fd860b67000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fd86095f000)
        libnvrtc.so.9.0 => /usr/local/cuda-9.0/lib64/libnvrtc.so.9.0 (0x00007fd85f114000)
        libcuda.so.1 => /usr/lib/x86_64-linux-gnu/libcuda.so.1 (0x00007fd85e297000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fd85e07a000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fd85dd71000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fd85db5b000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd85d791000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fd860d6b000)
        libnvidia-fatbinaryloader.so.384.98 => /usr/lib/nvidia-384/libnvidia-fatbinaryloader.so.384.98 (0x00007fd85d53f000)

temporally, we can provide OpenCL only binaries separatly,
or... we can remove the dependency of libnvrtc*.so + libcuda*.so using dlopen() method.
(see also https://github.com/CudaWrangler/cuew/blob/master/src/cuew.c)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment