File: rules

package info (click to toggle)
miopen 6.4.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 66,788 kB
  • sloc: cpp: 300,511; lisp: 29,731; ansic: 2,683; sh: 471; python: 323; makefile: 155
file content (90 lines) | stat: -rwxr-xr-x 2,500 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/usr/bin/make -f

export CXX=clang++-21
export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=-lto
export DEB_CXXFLAGS_MAINT_PREPEND = -gz
export VERBOSE=1

# filter incompatible options from affecting device code
CXXFLAGS := $(subst -fstack-protector-strong,-Xarch_host -fstack-protector-strong,$(CXXFLAGS))
CXXFLAGS := $(subst -fcf-protection,-Xarch_host -fcf-protection,$(CXXFLAGS))

NUM_THREADS = 1
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
	NUM_THREADS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
endif

CMAKE_FLAGS = \
	-DCMAKE_BUILD_TYPE=Release \
	-DROCM_SYMLINK_LIBS=OFF \
	-DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF \
	-DMIOPEN_USE_MLIR=OFF \
	-DMIOPEN_BUILD_DRIVER=ON \
	-DMIOPEN_ENABLE_FIN=OFF \
	-DMIOPEN_STRIP_SYMBOLS=OFF \
	-DMIOPEN_DISABLE_SYSDB=ON \
	-DMIOPEN_BACKEND=HIP \
	-DBoost_USE_STATIC_LIBS=OFF

# Those 2 next are going together both ON or both OFF
# This result in disabling both until HIPRTC is configurable TODO:
CMAKE_FLAGS += \
	-DMIOPEN_USE_HIPRTC=OFF \
	-DMIOPEN_USE_COMGR=OFF

# From TheRock build/logs/MIOpen_configure.log
CMAKE_FLAGS += \
	-DHIP_PLATFORM=amd \
	-DBUILD_TESTING=ON \
	-DMIOPEN_USE_COMPOSABLEKERNEL=OFF \
	-DMIOPEN_USE_MLIR=OFF \
	-DMIOPEN_TEST_DISCRETE=OFF

# Hack for half ... see override_dh_auto_configure
CMAKE_FLAGS += \
	-DHALF_INCLUDE_DIR=$(CURDIR)/debian

# New requirement For 6.4.4
CMAKE_FLAGS += \
	-DMIOPEN_USE_HIPBLASLT=OFF \
	-DHIP_OC_COMPILER=clang-21

#	-DMIOPEN_DEBUG_GCN_ASM_KERNELS=OFF

%:
	dh $@ -Scmake --builddirectory=build

override_dh_auto_configure-arch:
	[ -d $(CURDIR)/debian/half ] || mkdir debian/half
	[ -L $(CURDIR)/debian/half/half.hpp ] || ln -s /usr/include/half.hpp $(CURDIR)/debian/half/half.hpp
	dh_auto_configure -- $(CMAKE_FLAGS)

override_dh_auto_build-indep:
	:

override_dh_auto_configure-indep:
	:

execute_after_dh_auto_build-indep: export http_proxy=127.0.0.1:9
execute_after_dh_auto_build-indep: export https_proxy=127.0.0.1:9
execute_after_dh_auto_build-indep:
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	rocm-docs-build
	rm -rf build/html/_static/fonts
	rm -rf build/html/_static/vendor
	rm -f  build/html/doxygen/html/jquery.js
endif

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	set -e \
	; if [ -r /dev/kfd ] \
	; then echo "W: No tests." \
	; else echo "W: /dev/kfd unreadable: no available AMD GPU." \
	;      echo "W: tests skipped." \
	; fi
endif

# dwz doesn't fully support DWARF-5 yet, see #1016936
override_dh_dwz:
	: