提交 eb14d463 编写于 作者: D dolphin8

android toolchain

上级 78c06e18
BEGIN {
print "digraph G {"
}
/op:/ {
id++
opname[id] = $NF
}
/input/ {
type = "input"
para = $NF
if (input[id]) {
input[id] = input[id] "|"
}
input[id] = input[id] "<" para ">" para
}
/output/ {
type = "output"
para = $NF
if (output[id]) {
output[id] = output[id] "|"
}
output[id] = output[id] "<" para ">" para
}
/attr/ {
type = "attr"
aname = $NF
if (attr_key[id]) {
attr_key[id] = attr_key[id] "|"
attr_value[id] = attr_value[id] "|"
}
attr_key[id] = attr_key[id] $NF
}
/argument/ {
if (type == "attr") {
split($0, arr, " - ")
attr_value[id] = attr_value[id] arr[2]
} else if ((type == "input") || (type == "output")) {
if (!var2id[$NF]) {
var_id++
var[var_id] = $NF
var2id[$NF] = var_id
}
varid = var2id[$NF]
lid++
if (type == "input") {
line[lid] = "var_" varid " -> " "op_" id ":<" para ">"
if (xout[$NF]) {
xi++
xline[xi] = "xop_" xout[$NF] " -> " "xop_" id
}
} else if (type == "output") {
line[lid] = "op_" id ":<" para ">" " -> " "var_" varid
xout[$NF] = id
}
}
}
/var name/ {
varname = $NF
vid = var2id[varname]
}
/var tensor desc dim / {
if (tensor[vid]) tensor[vid] = tensor[vid] " x "
tensor[vid] = tensor[vid] $NF
}
END {
print "subgraph cluster_G0 {"
for (i = 1; i <= id; i++) {
print "xop_" i "[label=\"" i ". " opname[i] "\"]"
}
for (i = 1; i <= xi; i++) {
print xline[i]
}
print "}"
for (i = 1; i <= id; i++) {
print "op_" i "[group=op;shape=record;label=\"{{" input[i] "}|<op>" i ". " opname[i] "|{" output[i] "}}\"]"
}
for (i = 1; i <= var_id; i++) {
print "var_" i "[label=\"" var[i] " [" tensor[i] "]\"]"
}
for (i = 1; i <= lid; i++) {
print line[i]
}
for (i = 1; i <= id; i++) {
print "attr_" i "[shape=record;label=\"{" attr_key[i] "}|{" attr_value[i] "}\"]"
print "attr_" i " -> " "op_" i ":<op>"
}
print "}"
}
set(ANDROID_ARM_NEON ON)
include("${CMAKE_CURRENT_LIST_DIR}/../android-cmake/android.toolchain.cmake")
\ No newline at end of file
set(ANDROID_PIE TRUE)
set(ANDROID_STL "c++_static")
set(ANDROID_PLATFORM "android-22")
include("${CMAKE_CURRENT_LIST_DIR}/../android-cmake/android.toolchain.cmake")
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册