parent
575b546b55
commit
b25b70c9c2
@ -0,0 +1,6 @@
|
||||
inc_path := $(shell pwd)/metadef/inc/external/
|
||||
out_path := $(shell pwd)/out/graph/lib64/stub/
|
||||
stub_path := $(shell pwd)/metadef/graph/stub/
|
||||
|
||||
mkdir_stub := $(shell mkdir -p $(out_path))
|
||||
graph_local_stub := $(shell $(HI_PYTHON) $(stub_path)/gen_stubapi.py $(inc_path) $(out_path))
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,6 @@
|
||||
inc_path := $(shell pwd)/inc/external/
|
||||
out_path := $(shell pwd)/out/ge/lib64/stub/
|
||||
stub_path := $(shell pwd)/framework/domi/stub/
|
||||
|
||||
mkdir_stub := $(shell mkdir -p $(out_path))
|
||||
local_stub := $(shell $(HI_PYTHON) $(stub_path)/gen_stubapi.py $(inc_path) $(out_path))
|
@ -0,0 +1,4 @@
|
||||
###################################################################################
|
||||
the directory (stub) saves the stub file
|
||||
gen_stubapi.py is using for retrieving API and generating stub functions
|
||||
###################################################################################
|
@ -0,0 +1,44 @@
|
||||
# "stub" usage:
|
||||
|
||||
## Description
|
||||
|
||||
- File libge_compiler.so ,libgraph.so are used in IR build application interface.
|
||||
|
||||
# Attention
|
||||
|
||||
- Don't link other library except libge_compiler.so ,libgraph.so, as they may be changed in the future.
|
||||
|
||||
# Usage
|
||||
|
||||
## Compile: compile the application invoking the IR build API.
|
||||
|
||||
Makefile:
|
||||
|
||||
'''
|
||||
|
||||
ATC_INCLUDE_DIR := $(ASCEND_PATH)/atc/include
|
||||
OPP_INCLUDE_DIR := $(ASCEND_PATH)/opp/op_proto/built-in/inc
|
||||
LOCAL_MODULE_NAME := ir_build
|
||||
CC := g++
|
||||
CFLAGS := -std=c++11 -g -Wall
|
||||
SRCS := $(wildcard $(LOCAL_DIR)/main.cpp)
|
||||
INCLUDES := -I $(ASCEND_OPP_PATH)/op_proto/built-in/inc \
|
||||
-I $(ATC_INCLUDE_DIR)/graph \
|
||||
-I $(ATC_INCLUDE_DIR)/ge \
|
||||
|
||||
LIBS := -L ${ASCEND_PATH}/atc/lib64/stub \
|
||||
-lgraph \
|
||||
-lge_compiler
|
||||
ir_build:
|
||||
mkdir -p out
|
||||
$(CC) $(SRCS) $(INCLUDES) $(LIBS) $(CFLAGS) -o ./out/$(LOCAL_MODULE_NAME)
|
||||
clean:
|
||||
rm -rf out
|
||||
|
||||
'''
|
||||
make
|
||||
|
||||
## Run the application after set the LD_LIBRARY_PATH to include the real path of the library which locates in the directory of atc/lib64
|
||||
|
||||
export LD_LIBRARY_PATH= $(ASCEND_PATH)/atc/lib64
|
||||
- ./ ir_build
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue