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

name = 'cuDNN'
version = '5.1'
local_cuda_version = '8.0.44'

versionsuffix = '-CUDA-%s' % local_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 = SYSTEM

# 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', local_cuda_version)]

# checksums = [
#    '099ca6a9b21b35e32f3408eff2a1c06d',    # cudnn-8.0-linux-x64-v5.1.tgz
#]

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

moduleclass = 'numlib'
