Skip to content
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

Add support for versioned loading of libs at runtime; Fix cudnn cmake install command #2954

Merged
merged 3 commits into from Jul 2, 2020

Conversation

9prady9
Copy link
Member

@9prady9 9prady9 commented Jun 30, 2020

Description

  • Added support for loading versioned libraries by DependencyModule class. If versioned library is not found, the search will fallback to non versioned name lookup.
  • Changed cudnn module to lookup latest minor releases for each major version available.
  • Earlier to this change, cuDNN install command failed on windows. On Linux, it was packaged with incorrect version suffix.
    After this change, cuDNN library will be installed as <lib prefix>cudnn<lib suffix><soname> on unix platform.

Changes to Users

None

Checklist

  • Rebased on latest master
  • Code compiles
  • [ ] Tests pass
  • [ ] Functions added to unified API
  • [ ] Functions documented

@9prady9 9prady9 added this to the 3.7.2 milestone Jun 30, 2020
@9prady9 9prady9 requested a review from umar456 June 30, 2020 02:29
@9prady9
Copy link
Member Author

9prady9 commented Jun 30, 2020

Leaving sample output of versioned loading for reference.

[platform][1593503872][042598] [ ../src/backend/common/DependencyModule.cpp:62 ] Attempting to load: libforge.so
[platform][1593503872][042598] [ ../src/backend/common/DependencyModule.cpp:65 ] Found: libforge.so
[platform][1593503872][042598] [ ../src/backend/cuda/device_manager.cpp:427 ] CUDA Driver supports up to CUDA 10.2 ArrayFire CUDA Runtime 10.2
[platform][1593503872][042598] [ ../src/backend/cuda/device_manager.cpp:495 ] Found 1 CUDA devices
[platform][1593503872][042598] [ ../src/backend/cuda/device_manager.cpp:517 ] Found device: GeForce GTX 1060 3GB (2.94 GB | ~3754.03 GFLOPs | 9 SMs)
[platform][1593503872][042598] [ ../src/backend/cuda/device_manager.cpp:556 ] AF_CUDA_DEFAULT_DEVICE: 
[platform][1593503872][042598] [ ../src/backend/cuda/device_manager.cpp:574 ] Default device: 0(GeForce GTX 1060 3GB)
ArrayFire v3.8.0 (CUDA, 64-bit Linux, build 703a1fdc8)
Platform: CUDA Runtime 10.2, Driver: 440.100
[0] GeForce GTX 1060 3GB, 3012 MB, CUDA Compute 6.1
[mem][1593503873][042598] [ ../src/backend/cuda/memory.cpp:158 ] nativeAlloc:    1 KB 0x7f69c4600000
[platform][1593503873][042598] [ ../src/backend/common/DependencyModule.cpp:95 ] Attempting to load: libcudnn.so.7.6.5
[platform][1593503873][042598] [ ../src/backend/common/DependencyModule.cpp:98 ] Found: libcudnn.so.7.6.5
[platform][1593503873][042598] [ ../src/backend/cuda/cudnnModule.cpp:85 ] cuDNN Version: 7.6.5 cuDNN CUDA Runtime: 10.0
[platform][1593503873][042598] WARNING: ArrayFire CUDA Runtime(10.2) and cuDNN CUDA Runtime(10.0) do not match. For maximum compatibility, make sure the two versions match.(Ignoring check)
[platform][1593503873][042598] [ ../src/backend/cuda/platform.cpp:118 ] Initializing cuDNN

@9prady9 9prady9 force-pushed the fix_cmake_install_cudnn_win branch from 9a0e608 to 1f5b14f Compare June 30, 2020 08:20
@9prady9 9prady9 changed the title Fix cudnn cmake install command Add support for versioned loading of libs at runtime; Fix cudnn cmake install command Jun 30, 2020
@9prady9 9prady9 force-pushed the fix_cmake_install_cudnn_win branch 3 times, most recently from c185649 to f2dc035 Compare July 1, 2020 03:38
umar456
umar456 previously approved these changes Jul 1, 2020
Copy link
Member

@umar456 umar456 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of minor comments. They are not major.

src/backend/common/DependencyModule.cpp Outdated Show resolved Hide resolved
src/backend/common/DependencyModule.cpp Outdated Show resolved Hide resolved
umar456
umar456 previously approved these changes Jul 2, 2020
@umar456 umar456 merged commit 307881b into arrayfire:master Jul 2, 2020
@9prady9 9prady9 deleted the fix_cmake_install_cudnn_win branch July 3, 2020 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants