##
# This file is an EasyBuild reciPY as per https://github.com/easybuilders/easybuild
#
# Author:    Stephane Thiell <sthiell@stanford.edu>
##
easyblock = 'Tarball'

name = 'cuDNN'
version = '5.1'
cuda_version = '8.0.44'

versionsuffix = '-CUDA-%s' % cuda_version

homepage = 'https://developer.nvidia.com/cudnn'
description = """The NVIDIA CUDA Deep Neural Network library (cuDNN) is a GPU-accelerated library of primitives for
    deep neural networks."""

toolchain = {'name': 'dummy', 'version': 'dummy'}

# Nvidia developer registration required.
# Download link: https://developer.nvidia.com/rdp/cudnn-download
sources = ['%(namelower)s-8.0-linux-x64-v%(version)s.tgz']

dependencies = [('CUDA', cuda_version)]

checksums = [
    '406f4ac7f7ee8aa9e41304c143461a69',    # cudnn-8.0-linux-x64-v5.1.tgz, Jan 20 2017 download
]

sanity_check_paths = {
    'files': ['include/cudnn.h', 'lib64/libcudnn_static.a'],
    'dirs': ['include', 'lib64'],
}

moduleclass = 'numlib'
