@@ -33,14 +33,21 @@ def cmake_build(Map conf=[:]){
33
33
def debug_flags = " -g -fno-omit-frame-pointer -fsanitize=undefined -fno-sanitize-recover=undefined -Wno-option-ignored " + conf. get(" extradebugflags" , " " )
34
34
def build_envs = " CTEST_PARALLEL_LEVEL=4 " + conf. get(" build_env" ," " )
35
35
def prefixpath = conf. get(" prefixpath" ," /opt/rocm" )
36
+ def build_type_debug = (conf. get(" build_type" ,' release' ) == ' debug' )
37
+ def code_conv_enabled = conf. get(" codecov" , false )
38
+
36
39
def mlir_args = " -DMIOPEN_USE_MLIR=" + conf. get(" mlir_build" , " ON" )
40
+ // WORKAROUND_ISSUE_3192 Disabling MLIR for debug builds since MLIR generates sanitizer errors.
41
+ if (build_type_debug || code_conv_enabled)
42
+ {
43
+ mlir_args = " -DMIOPEN_USE_MLIR=OFF"
44
+ }
45
+
37
46
def setup_args = mlir_args + " -DMIOPEN_GPU_SYNC=Off " + conf. get(" setup_flags" ," " )
38
47
def build_fin = conf. get(" build_fin" , " OFF" )
39
48
40
49
setup_args = setup_args + " -DCMAKE_PREFIX_PATH=${ prefixpath} "
41
50
42
- def build_type_debug = (conf. get(" build_type" ,' release' ) == ' debug' )
43
-
44
51
// cmake_env can overwrite default CXX variables.
45
52
def cmake_envs = " CXX=${ compiler} CXXFLAGS='-Werror' " + conf. get(" cmake_ex_env" ," " )
46
53
@@ -72,7 +79,7 @@ def cmake_build(Map conf=[:]){
72
79
test_flags = " --disable-verification-cache " + test_flags
73
80
}
74
81
75
- if (conf . get( " codecov " , false ) ){ // Need
82
+ if (code_conv_enabled ){ // Need
76
83
setup_args = " -DCMAKE_BUILD_TYPE=debug -DCMAKE_CXX_FLAGS_DEBUG='${ debug_flags} -fprofile-arcs -ftest-coverage' -DCODECOV_TEST=On " + setup_args
77
84
}else if (build_type_debug){
78
85
setup_args = " -DCMAKE_BUILD_TYPE=debug -DCMAKE_CXX_FLAGS_DEBUG='${ debug_flags} '" + setup_args
0 commit comments