File: 0003-disable-optimizations-for-kernel-index.patch

package info (click to toggle)
miopen 5.5.1%2Bdfsg2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 23,988 kB
  • sloc: cpp: 229,870; lisp: 30,281; ansic: 1,518; sh: 392; makefile: 209; xml: 189; python: 56
file content (27 lines) | stat: -rw-r--r-- 839 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
From: Cordell Bloor <cgmb@slerp.xyz>
Date: Mon, 19 Jun 2023 19:03:38 -0600
Subject: disable optimizations for kernel index

This file will cause the clang frontend to crash if built with
optimizations.

Forwarded: not-needed
---
 src/CMakeLists.txt | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index a9e6d9e..95aa501 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -511,6 +511,10 @@ if( MIOPEN_BACKEND MATCHES "OpenCL" OR MIOPEN_BACKEND STREQUAL "HIPOC" OR MIOPEN
         ${PROJECT_BINARY_DIR}/kernel.cpp
         ${PROJECT_BINARY_DIR}/kernel_includes.cpp
         )
+    set_source_files_properties(
+        ${PROJECT_BINARY_DIR}/kernel.cpp
+        PROPERTIES COMPILE_FLAGS -O0
+        )
 endif()
 
 if(miopengemm_FOUND OR MIOPEN_USE_ROCBLAS OR MIOPEN_USE_MIOPENTENSILE)