Skip to content

Commit 3c1dbea

Browse files
committed
add explanation to code generation scripts
1 parent 61ef6a5 commit 3c1dbea

File tree

4 files changed

+48
-0
lines changed

4 files changed

+48
-0
lines changed

lib/gen/mli_krn_avepool_gen.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22
from codegen import Codegen
33
import sys
44

5+
# This script is used to generate the specialized versions for the avepool functions.
6+
# The specialized functions can be called directly from the application, or the generated
7+
# wrapper function can be called. The script builds a list with specializations by
8+
# (optionally) fixing strides, kernel sizes, number of channels, or padding mode for
9+
# different value ranges. A value 0 means that the specific parameter is not fixed.
10+
# After the complete list is build, the code is generated based on a function template,
11+
# and inserted into the file template. This script can be used to generate the cc files for
12+
# different bit precisions, and it can also generate the header file that contains the
13+
# function prototypes of all specializations. For normal operation of the lib there is no
14+
# need to update the script.
15+
# The script can be exectued with python 2.7
16+
517
#------------------------------------------------------------
618
# avepool functions chw
719
#------------------------------------------------------------

lib/gen/mli_krn_conv2d_gen.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22
from codegen import Codegen
33
import sys
44

5+
# This script is used to generate the specialized versions for the conv2d functions.
6+
# The specialized functions can be called directly from the application, or the generated
7+
# wrapper function can be called. The script builds a list with specializations by
8+
# (optionally) fixing strides, kernel sizes, number of channels, or padding mode for
9+
# different value ranges. A value 0 means that the specific parameter is not fixed.
10+
# After the complete list is build, the code is generated based on a function template,
11+
# and inserted into the file template. This script can be used to generate the cc files for
12+
# different bit precisions, and it can also generate the header file that contains the
13+
# function prototypes of all specializations. For normal operation of the lib there is no
14+
# need to update the script.
15+
# The script can be exectued with python 2.7
16+
517
#------------------------------------------------------------
618
# convolution functions chw
719
#------------------------------------------------------------

lib/gen/mli_krn_depthwise_conv2d_gen.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22
from codegen import Codegen
33
import sys
44

5+
# This script is used to generate the specialized versions for the depthwise_conv2d functions.
6+
# The specialized functions can be called directly from the application, or the generated
7+
# wrapper function can be called. The script builds a list with specializations by
8+
# (optionally) fixing strides, kernel sizes, number of channels, or padding mode for
9+
# different value ranges. A value 0 means that the specific parameter is not fixed.
10+
# After the complete list is build, the code is generated based on a function template,
11+
# and inserted into the file template. This script can be used to generate the cc files for
12+
# different bit precisions, and it can also generate the header file that contains the
13+
# function prototypes of all specializations. For normal operation of the lib there is no
14+
# need to update the script.
15+
# The script can be exectued with python 2.7
16+
517
#------------------------------------------------------------
618
# convolution functions chw
719
#------------------------------------------------------------

lib/gen/mli_krn_maxpool_gen.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22
from codegen import Codegen
33
import sys
44

5+
# This script is used to generate the specialized versions for the maxpool functions.
6+
# The specialized functions can be called directly from the application, or the generated
7+
# wrapper function can be called. The script builds a list with specializations by
8+
# (optionally) fixing strides, kernel sizes, number of channels, or padding mode for
9+
# different value ranges. A value 0 means that the specific parameter is not fixed.
10+
# After the complete list is build, the code is generated based on a function template,
11+
# and inserted into the file template. This script can be used to generate the cc files for
12+
# different bit precisions, and it can also generate the header file that contains the
13+
# function prototypes of all specializations. For normal operation of the lib there is no
14+
# need to update the script.
15+
# The script can be exectued with python 2.7
16+
517
#------------------------------------------------------------
618
# maxpool functions chw
719
#------------------------------------------------------------

0 commit comments

Comments
 (0)