CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
69 lines
2.8 KiB
Groovy
69 lines
2.8 KiB
Groovy
// This file is for internal AMD use.
|
|
// If you are interested in running your own Jenkins, please raise a github issue for assistance.
|
|
|
|
def runCompileCommand(platform, project, jobName, boolean debug=false)
|
|
{
|
|
project.paths.construct_build_prefix()
|
|
|
|
def getDependenciesCommand = ""
|
|
if (project.installLibraryDependenciesFromCI) {
|
|
project.libraryDependencies.each
|
|
{ libraryName ->
|
|
getDependenciesCommand += auxiliary.getLibrary(libraryName, platform.jenkinsLabel, 'develop')
|
|
}
|
|
}
|
|
|
|
String buildTypeArg = debug ? '-DCMAKE_BUILD_TYPE=Debug' : '-DCMAKE_BUILD_TYPE=Release'
|
|
String buildTypeDir = debug ? 'debug' : 'release'
|
|
String cmake = platform.jenkinsLabel.contains('centos') ? 'cmake3' : 'cmake'
|
|
//Set CI node's gfx arch as target if PR, otherwise use default targets of the library
|
|
String amdgpuTargets = env.BRANCH_NAME.startsWith('PR-') ? '-DAMDGPU_TARGETS="$gfx_arch"' : ''
|
|
String compilerLauncher = project.defaults.ccache ? '-DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache' : ''
|
|
String cmakeArgs = "-DCMAKE_C_COMPILER=/opt/rocm/bin/hipcc -DCMAKE_CXX_COMPILER=/opt/rocm/bin/hipcc ${compilerLauncher} ${buildTypeArg} ${amdgpuTargets}"
|
|
String hipccCompileFlags = "export HIPCC_COMPILE_FLAGS_APPEND='-O3 -Wno-format-nonliteral -parallel-jobs=1'"
|
|
// Set number of compile threads to lesser of nproc or 12
|
|
int nproc = Runtime.runtime.availableProcessors()
|
|
int numThreads = Math.min(nproc, 12)
|
|
|
|
def command = """#!/usr/bin/env bash
|
|
set -x
|
|
cd ${project.paths.project_build_prefix}
|
|
${getDependenciesCommand}
|
|
echo Original HIPCC_COMPILE_FLAGS_APPEND: \$HIPCC_COMPILE_FLAGS_APPEND
|
|
${hipccCompileFlags}
|
|
mkdir -p build/${buildTypeDir} && cd build/${buildTypeDir}
|
|
${auxiliary.gfxTargetParser()}
|
|
${cmake} ${cmakeArgs} -DROCWMMA_BUILD_BENCHMARK_TESTS=OFF ../..
|
|
make -j ${numThreads}
|
|
"""
|
|
|
|
platform.runCommand(this, command)
|
|
}
|
|
|
|
|
|
def runTestCommand (platform, project)
|
|
{
|
|
def testCommand = "ctest --output-on-failure "
|
|
def testCommandExclude = ""
|
|
|
|
def command = """#!/usr/bin/env bash
|
|
set -x
|
|
cd ${project.paths.project_build_prefix}
|
|
export ROCWMMA_INCLUDE_PATH=\$(readlink -f ./library/include)
|
|
cd ${project.testDirectory}
|
|
${testCommand} ${testCommandExclude}
|
|
"""
|
|
|
|
platform.runCommand(this, command)
|
|
}
|
|
|
|
def runPackageCommand(platform, project)
|
|
{
|
|
def packageHelper = platform.makePackage(platform.jenkinsLabel,"${project.paths.project_build_prefix}/build/release")
|
|
|
|
platform.runCommand(this, packageHelper[0])
|
|
platform.archiveArtifacts(this, packageHelper[1])
|
|
}
|
|
|
|
return this
|