# IT4Innovations 2019

easyblock = 'Tarball'

name = 'cuDNN'
version = '7.6.4.38'
local_cuda_version = '10.1.243'

local_cuda_version_major_minor = '.'.join(local_cuda_version.split('.')[:2])

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-%s-linux-x64-v%%(version)s.tgz' % local_cuda_version_major_minor]
checksums = ['457d052f249cb571ebee3eb5ad29685c']

dependencies = [('CUDA', local_cuda_version)]

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

modluafooter = 'add_property("arch","gpu")'

moduleclass = 'numlib'
