Skip to content

Commit

Permalink
Merge pull request #1198 from zaliu/swdev-298366
Browse files Browse the repository at this point in the history
resolves SWDEV-298366
  • Loading branch information
zaliu authored Aug 13, 2021
2 parents 8328dcc + 7f1d27b commit 06d797d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
6 changes: 2 additions & 4 deletions .jenkins/common.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand All @@ -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'))
{
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion .jenkins/precheckin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions library/src/handle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 5 additions & 2 deletions library/src/tensile_host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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])};
Expand Down

0 comments on commit 06d797d

Please sign in to comment.