File: rules

package info (click to toggle)
armnn 20.08-9
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 20,472 kB
  • sloc: cpp: 211,547; python: 2,756; sh: 285; makefile: 38; asm: 6
file content (68 lines) | stat: -rwxr-xr-x 3,365 bytes parent folder | download
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
export DH_VERBOSE = 1


# see FEATURE AREAS in dpkg-buildflags(1)
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
#export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
# package maintainers to append LDFLAGS
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed


# Neon always available on arm64, not armcomputelib on non-arm arches
ifeq ($(DEB_HOST_ARCH),arm64)
OPTS+=-DARMCOMPUTENEON=1 -DARMCOMPUTECL=1 -DARMCOMPUTE_LIBRARIES='arm_compute;arm_compute_core'
endif
ifeq ($(DEB_HOST_ARCH),armhf)
OPTS+=-DARMCOMPUTECL=1 -DARMCOMPUTENEON=1 -DARMCOMPUTE_LIBRARIES='arm_compute;arm_compute_core'
endif

PYTHON_INCLUDE_DIR=$(shell python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")
PYTHON_LIBRARY=$(shell python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))")

export DH_VERBOSE=1
%:
	dh $@ --with python3 --buildsystem=cmake --builddirectory=build-area

override_dh_auto_configure:
	flatc -c --gen-object-api --reflect-types --reflect-names -o $(CURDIR)/third-party/tensorflow/ $(CURDIR)/third-party/tensorflow/schema.fbs
	dh_auto_configure -- $(OPTS) -DBUILD_TESTS=1 \
                                     -DSHARED_BOOST=ON \
                                     -DARMNNREF=0 \
                                     -DBUILD_ARMNN_SERIALIZER=1 \
                                     -DBUILD_TF_LITE_PARSER=1 \
                                     -DTF_LITE_GENERATED_PATH=$(CURDIR)/third-party/tensorflow \
                                     -DPYTHON_INCLUDE_DIR=$(PYTHON_INCLUDE_DIR)  \
                                     -DPYTHON_LIBRARY=$(PYTHON_LIBRARY) \
                                     -DBUILD_PYTHON_SRC=ON \
                                     -DSWIG_EXECUTABLE=/usr/bin/swig \
                                     -DBUILD_GATORD_MOCK=0 \
                                     -DDYNAMIC_BACKEND_PATHS='/usr/lib/$(DEB_HOST_MULTIARCH)/armnn22/'

execute_after_dh_install:
	#Something is putting RUNPATH in the SWIG libraries. Kill it.
	chrpath -d debian/python3-pyarmnn/usr/lib/python3/dist-packages/pyarmnn/_generated/*.so

#
#opencl library is dynamically loaded on arches where it is available. OPENCL tests can't be run at build time
TESTFILTER=!Compute_ArmComputeCl:!MemCopyClNeon:!CreateWorkloadCl:!ClEndToEnd:!ClLayerSupport:\
!ClOptimizedNetwork:!ClJsonPrinter:!ClRuntime:!Fp16Support:!OpenClTimerBatchNorm:!ClMemCopy

#Profiling not currently built, and the SendCounterPacket tests fail on BE arches
TESTFILTER+=:!SendCounterPacketTests
#These were failing on i386 (in 19.11)
TESTFILTER+=:!ProfilingGuidTests
TESTFILTER+=:!SendTimelinePacketTests:!TimelinePacketTests:!TimelineUtilityMethodsTests

#Trouble with embedded spaces above, so
TESTFILTER=!Compute_ArmComputeCl:!MemCopyClNeon:!CreateWorkloadCl:!ClEndToEnd:!ClLayerSupport:!ClOptimizedNetwork:!ClJsonPrinter:!ClRuntime:!Fp16Support:!OpenClTimerBatchNorm:!ClMemCopy:!SendCounterPacketTests:!ProfilingGuidTests:!SendTimelinePacketTests:!TimelinePacketTests:!TimelineUtilityMethodsTests

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	./build-area/UnitTests  --run_test=$(TESTFILTER)
endif