File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,7 +70,12 @@ endif()
7070# target_compile_definitions(${_trgt} PRIVATE _WIN=1)
7171# endif()
7272
73- target_link_options (${_trgt} PUBLIC -fsycl-device-code-split=per_kernel )
73+ # For coverage builds, use per_source instead of per_kernel to reduce memory
74+ if (DPNP_GENERATE_COVERAGE)
75+ target_link_options (${_trgt} PUBLIC -fsycl-device-code-split=per_source )
76+ else ()
77+ target_link_options (${_trgt} PUBLIC -fsycl-device-code-split=per_kernel )
78+ endif ()
7479
7580if (DPNP_GENERATE_COVERAGE)
7681 target_link_options (${_trgt} PRIVATE -fprofile-instr-generate -fcoverage-mapping )
Original file line number Diff line number Diff line change @@ -100,7 +100,18 @@ else()
100100 )
101101endif ()
102102
103- target_link_options (${python_module_name} PUBLIC -fsycl-device-code-split=per_kernel )
103+ # For coverage builds, use per_source instead of per_kernel to reduce memory
104+ if (DPNP_GENERATE_COVERAGE)
105+ target_link_options (
106+ ${python_module_name}
107+ PUBLIC -fsycl-device-code-split=per_source
108+ )
109+ else ()
110+ target_link_options (
111+ ${python_module_name}
112+ PUBLIC -fsycl-device-code-split=per_kernel
113+ )
114+ endif ()
104115
105116if (DPNP_GENERATE_COVERAGE)
106117 target_link_options (
Original file line number Diff line number Diff line change @@ -93,7 +93,18 @@ else()
9393 )
9494endif ()
9595
96- target_link_options (${python_module_name} PUBLIC -fsycl-device-code-split=per_kernel )
96+ # For coverage builds, use per_source instead of per_kernel to reduce memory
97+ if (DPNP_GENERATE_COVERAGE)
98+ target_link_options (
99+ ${python_module_name}
100+ PUBLIC -fsycl-device-code-split=per_source
101+ )
102+ else ()
103+ target_link_options (
104+ ${python_module_name}
105+ PUBLIC -fsycl-device-code-split=per_kernel
106+ )
107+ endif ()
97108
98109if (DPNP_GENERATE_COVERAGE)
99110 target_link_options (
Original file line number Diff line number Diff line change @@ -98,7 +98,18 @@ else()
9898endif ()
9999
100100target_compile_options (${python_module_name} PUBLIC -fno-sycl-id-queries-fit-in-int )
101- target_link_options (${python_module_name} PUBLIC -fsycl-device-code-split=per_kernel )
101+ # For coverage builds, use per_source instead of per_kernel to reduce memory
102+ if (DPNP_GENERATE_COVERAGE)
103+ target_link_options (
104+ ${python_module_name}
105+ PUBLIC -fsycl-device-code-split=per_source
106+ )
107+ else ()
108+ target_link_options (
109+ ${python_module_name}
110+ PUBLIC -fsycl-device-code-split=per_kernel
111+ )
112+ endif ()
102113
103114if (DPNP_GENERATE_COVERAGE)
104115 target_link_options (
Original file line number Diff line number Diff line change @@ -118,7 +118,18 @@ else()
118118 )
119119endif ()
120120
121- target_link_options (${python_module_name} PUBLIC -fsycl-device-code-split=per_kernel )
121+ # For coverage builds, use per_source instead of per_kernel to reduce memory
122+ if (DPNP_GENERATE_COVERAGE)
123+ target_link_options (
124+ ${python_module_name}
125+ PUBLIC -fsycl-device-code-split=per_source
126+ )
127+ else ()
128+ target_link_options (
129+ ${python_module_name}
130+ PUBLIC -fsycl-device-code-split=per_kernel
131+ )
132+ endif ()
122133
123134if (DPNP_GENERATE_COVERAGE)
124135 target_link_options (
Original file line number Diff line number Diff line change @@ -102,7 +102,18 @@ else()
102102 )
103103endif ()
104104
105- target_link_options (${python_module_name} PUBLIC -fsycl-device-code-split=per_kernel )
105+ # For coverage builds, use per_source instead of per_kernel to reduce memory
106+ if (DPNP_GENERATE_COVERAGE)
107+ target_link_options (
108+ ${python_module_name}
109+ PUBLIC -fsycl-device-code-split=per_source
110+ )
111+ else ()
112+ target_link_options (
113+ ${python_module_name}
114+ PUBLIC -fsycl-device-code-split=per_kernel
115+ )
116+ endif ()
106117
107118if (DPNP_GENERATE_COVERAGE)
108119 target_link_options (
Original file line number Diff line number Diff line change @@ -129,7 +129,18 @@ else()
129129 )
130130endif ()
131131
132- target_link_options (${python_module_name} PUBLIC -fsycl-device-code-split=per_kernel )
132+ # For coverage builds, use per_source instead of per_kernel to reduce memory
133+ if (DPNP_GENERATE_COVERAGE)
134+ target_link_options (
135+ ${python_module_name}
136+ PUBLIC -fsycl-device-code-split=per_source
137+ )
138+ else ()
139+ target_link_options (
140+ ${python_module_name}
141+ PUBLIC -fsycl-device-code-split=per_kernel
142+ )
143+ endif ()
133144
134145if (DPNP_GENERATE_COVERAGE)
135146 target_link_options (
Original file line number Diff line number Diff line change @@ -142,7 +142,18 @@ else()
142142 )
143143endif ()
144144
145- target_link_options (${python_module_name} PUBLIC -fsycl-device-code-split=per_kernel )
145+ # For coverage builds, use per_source instead of per_kernel to reduce memory
146+ if (DPNP_GENERATE_COVERAGE)
147+ target_link_options (
148+ ${python_module_name}
149+ PUBLIC -fsycl-device-code-split=per_source
150+ )
151+ else ()
152+ target_link_options (
153+ ${python_module_name}
154+ PUBLIC -fsycl-device-code-split=per_kernel
155+ )
156+ endif ()
146157
147158if (DPNP_GENERATE_COVERAGE)
148159 target_link_options (
Original file line number Diff line number Diff line change @@ -98,7 +98,18 @@ else()
9898 )
9999endif ()
100100
101- target_link_options (${python_module_name} PUBLIC -fsycl-device-code-split=per_kernel )
101+ # For coverage builds, use per_source instead of per_kernel to reduce memory
102+ if (DPNP_GENERATE_COVERAGE)
103+ target_link_options (
104+ ${python_module_name}
105+ PUBLIC -fsycl-device-code-split=per_source
106+ )
107+ else ()
108+ target_link_options (
109+ ${python_module_name}
110+ PUBLIC -fsycl-device-code-split=per_kernel
111+ )
112+ endif ()
102113
103114if (DPNP_GENERATE_COVERAGE)
104115 target_link_options (
You can’t perform that action at this time.
0 commit comments