diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/SConscript | 26 | ||||
-rw-r--r-- | examples/graph_alexnet.cpp | 1 | ||||
-rw-r--r-- | examples/graph_googlenet.cpp | 1 | ||||
-rw-r--r-- | examples/graph_lenet.cpp | 1 | ||||
-rw-r--r-- | examples/graph_mobilenet.cpp | 1 | ||||
-rw-r--r-- | examples/graph_squeezenet.cpp | 1 | ||||
-rw-r--r-- | examples/graph_vgg19.cpp | 1 |
7 files changed, 19 insertions, 13 deletions
diff --git a/examples/SConscript b/examples/SConscript index e002d11edd..3357ccaf33 100644 --- a/examples/SConscript +++ b/examples/SConscript @@ -42,7 +42,7 @@ if env['gles_compute'] and env['os'] != 'android': # Build examples utils = examples_env.Object("../utils/Utils.cpp") -if env['os'] in ['bare_metal'] or env['standalone']: +if env['os'] in ['android', 'bare_metal'] or env['standalone']: Import('arm_compute_a') Import('arm_compute_core_a') arm_compute_libs = [ arm_compute_a, arm_compute_core_a ] @@ -59,16 +59,28 @@ if env['opencl'] and env['neon']: Depends(prog, [arm_compute_dependency, opencl]) alias = examples_env.Alias(example, prog) Default(alias) - Import('arm_compute_graph_so') - arm_compute_graph_libs = ["arm_compute_graph", "arm_compute", "arm_compute_core"] - graph_dependency = arm_compute_graph_so + if env['os'] == 'android': + Import('arm_compute_graph_a') + Import('arm_compute_core_a') + Import('arm_compute_a') + arm_compute_graph_libs = [ arm_compute_graph_a, arm_compute_a, arm_compute_core_a, "OpenCL"] + graph_dependency = arm_compute_graph_a + else: + Import('arm_compute_graph_so') + arm_compute_graph_libs = ["arm_compute_graph", "arm_compute", "arm_compute_core"] + graph_dependency = arm_compute_graph_so graph_utils = examples_env.Object("../utils/GraphUtils.cpp") for file in Glob("./graph_*.cpp"): example = os.path.basename(os.path.splitext(str(file))[0]) - #-Wl,--allow-shlib-undefined: Ignore dependencies of dependencies - prog = examples_env.Program(example, ["{}.cpp".format(example), utils, graph_utils], LIBS = arm_compute_graph_libs, LINKFLAGS=examples_env["LINKFLAGS"]+['-Wl,--allow-shlib-undefined'] ) - Depends(prog, graph_dependency) + prog = None + if env['os'] == 'android': + prog = examples_env.Program(example, ["{}.cpp".format(example), utils, graph_utils], LIBS = arm_compute_graph_libs + ["OpenCL"]) + Depends(prog, [graph_dependency, opencl]) + else: + #-Wl,--allow-shlib-undefined: Ignore dependencies of dependencies + prog = examples_env.Program(example, ["{}.cpp".format(example), utils, graph_utils], LIBS = arm_compute_graph_libs, LINKFLAGS=examples_env["LINKFLAGS"]+['-Wl,--allow-shlib-undefined'] ) + Depends(prog, graph_dependency) alias = examples_env.Alias(example, prog) Default(alias) diff --git a/examples/graph_alexnet.cpp b/examples/graph_alexnet.cpp index 2d2ba6bb11..534ee45bcd 100644 --- a/examples/graph_alexnet.cpp +++ b/examples/graph_alexnet.cpp @@ -21,7 +21,6 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - #include "arm_compute/graph/Graph.h" #include "arm_compute/graph/Nodes.h" #include "support/ToolchainSupport.h" diff --git a/examples/graph_googlenet.cpp b/examples/graph_googlenet.cpp index e116633a02..b7ff4e4bf0 100644 --- a/examples/graph_googlenet.cpp +++ b/examples/graph_googlenet.cpp @@ -21,7 +21,6 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - #include "arm_compute/graph/Graph.h" #include "arm_compute/graph/Nodes.h" #include "arm_compute/graph/SubGraph.h" diff --git a/examples/graph_lenet.cpp b/examples/graph_lenet.cpp index f6af14c4cf..ad4a4e02c7 100644 --- a/examples/graph_lenet.cpp +++ b/examples/graph_lenet.cpp @@ -21,7 +21,6 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - #include "arm_compute/graph/Graph.h" #include "arm_compute/graph/Nodes.h" #include "support/ToolchainSupport.h" diff --git a/examples/graph_mobilenet.cpp b/examples/graph_mobilenet.cpp index 2b2da9e517..081fae67e2 100644 --- a/examples/graph_mobilenet.cpp +++ b/examples/graph_mobilenet.cpp @@ -21,7 +21,6 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - #include "arm_compute/graph/Graph.h" #include "arm_compute/graph/Nodes.h" #include "support/ToolchainSupport.h" diff --git a/examples/graph_squeezenet.cpp b/examples/graph_squeezenet.cpp index 51c4de0ec1..1743509256 100644 --- a/examples/graph_squeezenet.cpp +++ b/examples/graph_squeezenet.cpp @@ -21,7 +21,6 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - #include "arm_compute/graph/Graph.h" #include "arm_compute/graph/Nodes.h" #include "arm_compute/graph/SubGraph.h" diff --git a/examples/graph_vgg19.cpp b/examples/graph_vgg19.cpp index 61bb9a5190..a39e255ad0 100644 --- a/examples/graph_vgg19.cpp +++ b/examples/graph_vgg19.cpp @@ -21,7 +21,6 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - #include "arm_compute/graph/Graph.h" #include "arm_compute/graph/Nodes.h" #include "support/ToolchainSupport.h" |