CANN-tfplugin-1.5.1-goolf-2021a.9-Python-3.7.5.eb 1.61 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Stepan Nassyr (JSC)
#easyblock = 'Binary'
easyblock = 'CMakeNinja'

name = 'CANN-tfplugin'
version = '1.5.1'
homepage = 'https://e.huawei.com/en/products/cloud-computing-dc/atlas/cann'
description = 'CANN plugin for TensorFlow'
versionsuffix = '-Python-%(pyver)s'


toolchain = {'name': 'goolf', 'version': '2021a.9'}

sources = [{
    'filename': '%(name)s-%(version)s.tar.gz',
    'git_config': {
        'url': 'https://gitee.com/ascend/',
        'repo_name': 'tensorflow',
        'commit': 'b79ac8a',
        'recursive': True,
        'keep_git_dir': True,
    },
}]

patches = [
    'tfplugin-1.5.1-secure_c-checksum.patch',
    'tfplugin-1.7.0-use-swig-properly.patch',
    'tfplugin-1.7.0-install-in-cmake.patch',
    'tfplugin-1.7.0-flag-fix-plus-keep-cxx11abi.patch',
#    'tfplugin-1.7.0-ge-cxx11abi-shim.patch',
    'tfplugin-1.6.0-fix-missing-symbols.patch',
]

builddependencies = [
    ('CMake', '3.20.0'),
    ('Ninja', '1.10.2'),
    ('SWIG', '4.0.2')
]

cann_version = "5.0.2.alpha005"

dependencies = [
    ('Python', '3.7.5'),
    ('CANN-Toolkit', cann_version, versionsuffix),
    ('SciPy-Stack', '2021a', versionsuffix),
    ('TensorFlow-CANN-Core', '1.15.0', versionsuffix),
]

preconfigopts="olddir=$(pwd) && cd %%(builddir)s/tensorflow && ASCEND_CUSTOM_PATH=$EBROOTCANNMINTOOLKIT/ascend-toolkit/%s/ ./configure && cd $olddir &&" % cann_version
configopts="-DENABLE_OPEN_SRC=True"


sanity_check_paths = {
    'files': ['lib/python/site-packages/npu_bridge/tf_adapter.py'],
    'dirs' : ['lib/python/site-packages/npu_bridge']
}

modextrapaths = {
    'PYTHONPATH' : ['lib/python/site-packages'],
}

moduleclass = 'lib'