From 5cc17020f97ce4a0a7498ff4abd093fd8410e5f2 Mon Sep 17 00:00:00 2001 From: Alex Liu <35415350+zaliu@users.noreply.github.com> Date: Tue, 10 Aug 2021 02:52:43 +0000 Subject: [PATCH 1/2] resolves SWDEV-298366 --- library/src/handle.cpp | 6 ++++++ library/src/tensile_host.cpp | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/library/src/handle.cpp b/library/src/handle.cpp index 568508808..4a9d52128 100644 --- a/library/src/handle.cpp +++ b/library/src/handle.cpp @@ -15,6 +15,12 @@ extern "C" void rocblas_initialize() {} #endif +// forcing early cleanup +extern "C" void rocblas_shutdown() +{ + // rocblas_internal_ostream::clear_workers(); +} + // This variable can be set in hipBLAS or other libraries to change the default // device memory size static thread_local size_t t_rocblas_device_malloc_default_memory_size; diff --git a/library/src/tensile_host.cpp b/library/src/tensile_host.cpp index 6e3c42aa1..dfb564432 100644 --- a/library/src/tensile_host.cpp +++ b/library/src/tensile_host.cpp @@ -6,6 +6,8 @@ #include "rocblas.h" +extern "C" void rocblas_shutdown(); + #ifndef USE_TENSILE_HOST // In the old Tensile client, rocblas_initialize() is a no-op @@ -494,11 +496,12 @@ namespace // Find the location of librocblas.so // Fall back on hard-coded path if static library or not found - // [Use a C API (rocblas_sccal) *not* defined in this file to + // [Use a void C API (rocblas_shutdown) *not* defined in this file to // avoid compile-time resolution of the function pointer; cf. // https://man7.org/linux/man-pages/man3/dladdr.3.html "BUGS"] + // rocblas_sscal stopped working even though is not defined in this unit - if(dladdr((void*)rocblas_sscal, &info)) + if(dladdr((void*)rocblas_shutdown, &info)) { path = info.dli_fname; path = std::string{dirname(&path[0])}; From 7f1d27bcd138a69ffc85cd84b6d173cad2a62ded Mon Sep 17 00:00:00 2001 From: Eiden Yoshida Date: Wed, 11 Aug 2021 21:54:57 -0600 Subject: [PATCH 2/2] Remove sudo from math-CI build commands --- .jenkins/common.groovy | 6 ++---- .jenkins/precheckin.groovy | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.jenkins/common.groovy b/.jenkins/common.groovy index 5ad0edbc3..49f8cf569 100644 --- a/.jenkins/common.groovy +++ b/.jenkins/common.groovy @@ -7,7 +7,6 @@ def runCompileCommand(platform, project, jobName) String compiler = jobName.contains('hipclang') ? 'hipcc' : 'hcc' String hipClang = jobName.contains('hipclang') ? '--hip-clang' : '--no-hip-clang' - String sles = platform.jenkinsLabel.contains('sles') ? '/usr/bin/sudo --preserve-env' : '' String centos7 = platform.jenkinsLabel.contains('centos7') ? 'source scl_source enable devtoolset-7' : ':' String hipccCompileFlags = "" if (jobName.contains('hipclang')) @@ -32,14 +31,13 @@ def runCompileCommand(platform, project, jobName) ${centos7} echo Original HIPCC_COMPILE_FLAGS_APPEND: \$HIPCC_COMPILE_FLAGS_APPEND ${hipccCompileFlags} - ${sles} CXX=/opt/rocm/bin/${compiler} ${project.paths.build_command} ${hipClang} + CXX=/opt/rocm/bin/${compiler} ${project.paths.build_command} ${hipClang} """ platform.runCommand(this, command) } def runTestCommand (platform, project, gfilter) { - String sudo = auxiliary.sudo(platform.jenkinsLabel) String installPackage = "" if (platform.jenkinsLabel.contains('centos') || platform.jenkinsLabel.contains('sles')) { @@ -54,7 +52,7 @@ def runTestCommand (platform, project, gfilter) ${installPackage} popd cd ${project.paths.project_build_prefix}/build/release/clients/staging - ${sudo} GTEST_LISTENER=NO_PASS_LINE_IN_LOG ./rocblas-test --gtest_output=xml --gtest_color=yes --gtest_filter=${gfilter}-*known_bug* + GTEST_LISTENER=NO_PASS_LINE_IN_LOG ./rocblas-test --gtest_output=xml --gtest_color=yes --gtest_filter=${gfilter}-*known_bug* """ platform.runCommand(this, command) diff --git a/.jenkins/precheckin.groovy b/.jenkins/precheckin.groovy index a7414fbce..fc74da7fc 100644 --- a/.jenkins/precheckin.groovy +++ b/.jenkins/precheckin.groovy @@ -15,7 +15,7 @@ def runCI = def prj = new rocProject('rocBLAS', 'PreCheckin') // customize for project - prj.paths.build_command = './install.sh -c --cleanup' + prj.paths.build_command = './install.sh -c' prj.timeout.compile = 480 prj.timeout.test = 360