forked from intel/scikit-learn-intelex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gen.py
44 lines (39 loc) · 1.88 KB
/
gen.py
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
#!/usr/bin/env python
#===============================================================================
# Copyright 2020 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#===============================================================================
from generator.gen_daal4py import gen_daal4py
if __name__ == "__main__":
import argparse
global no_warn
description = """
A tool to create cython interface files for HLAPI of oneDAL (aka daal4py).
Extracting necessary data and creating internal data structures.
See parse.py for details about C++ parsing.
See wrappers.py for necessary configuration that can not be auto-extracted.
See wrapper_gen.py for code generation (cython and C++).
"""
argParser = argparse.ArgumentParser(
prog="gen_daal4py.py",
description=description,
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
argParser.add_argument('--daalroot', required=True,
help="DAAL root directory (reads include dir in there)")
argParser.add_argument('--outdir', default='build',
help="Output directory to store wrapper files to")
argParser.add_argument('--wall', default=False,
action='store_true', help="Emit all warnings")
args = argParser.parse_args()
gen_daal4py(args.daalroot, args.outdir, "v_develop", args.wall)