Skip to content

Commit

Permalink
Merge pull request #1883 from babakpst/release-staging/rocm-rel-6.1
Browse files Browse the repository at this point in the history
HOTFIX: update release 6.1 with the latest commits in develop
  • Loading branch information
babakpst authored Feb 10, 2024
2 parents d23b84a + cfbd48b commit d0314ce
Show file tree
Hide file tree
Showing 109 changed files with 264,077 additions and 3,638 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @babakpst @yoichiyoshida @bragadeesh @AlexBrownAMD @nakajee
7 changes: 5 additions & 2 deletions .jenkins/common.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ def runCompileCommand(platform, project, jobName, boolean debug=false)
// avoid bug causing long build times of certain files.
String buildType = 'Release' // debug ? 'Debug' : 'RelWithDebInfo'
String parallelJobs = "export HIPCC_COMPILE_FLAGS_APPEND='-O3 -Wno-format-nonliteral -parallel-jobs=4'"
String buildThreads = '-1' // if hipcc is used may be multiplied by parallel-jobs
if (platform.jenkinsLabel.contains('gfx11'))
buildThreads = '16'

// comment

Expand Down Expand Up @@ -62,7 +65,7 @@ def runCompileCommand(platform, project, jobName, boolean debug=false)
pushd build
export PATH=/opt/rocm/bin:\$PATH
cmake -DCMAKE_BUILD_TYPE=${buildType} -DCMAKE_CXX_COMPILER=${compiler} -DTensile_ROOT=\$(pwd)/../Tensile ../HostLibraryTests
cmake -DCMAKE_BUILD_TYPE=${buildType} -DCMAKE_CXX_COMPILER=${compiler} -DTensile_CPU_THREADS=${buildThreads} -DTensile_ROOT=\$(pwd)/../Tensile ../HostLibraryTests
NPROC_BUILD=16
if [ `nproc` -lt 16 ]
then
Expand Down Expand Up @@ -118,7 +121,7 @@ def runTestCommand (platform, project, jobName, test_marks, boolean skipHostTest
String compiler = 'hipcc'
String pythonVersion = 'py3'
String markSkipHostTest = skipHostTest ? "#" : ""
String markSkipExtendedTest = !test_marks.contains("extended") ? "--gtest_filter=-\"*Extended*\"" : ""
String markSkipExtendedTest = !test_marks.contains("extended") ? "\"--gtest_filter=-*Extended*:*Ocl*\"" : "\"--gtest_filter=-*Ocl*\""

def command = """#!/usr/bin/env bash
set -x
Expand Down
5 changes: 3 additions & 2 deletions .jenkins/extended.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def runCI =

boolean formatCheck = false

prj.timeout.test = 600
prj.timeout.test = 720
prj.defaults.ccache = false

def commonGroovy
Expand All @@ -63,7 +63,8 @@ def runCI =
platform, project->

def test_marks = "extended"
commonGroovy.runTestCommand(platform, project, jobName, test_marks)
boolean skipHostTest = true // Skip host test for now, until compiler update is available
commonGroovy.runTestCommand(platform, project, jobName, test_marks, skipHostTest)
}

buildProject(prj, formatCheck, nodes.dockerArray, compileCommand, testCommand, null)
Expand Down
3 changes: 2 additions & 1 deletion .jenkins/precheckin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ def runCI =
platform, project->

def test_marks = "pre_checkin"
commonGroovy.runTestCommand(platform, project, jobName, test_marks)
boolean skipHostTest = true // Skip host test for now, until compiler update is available
commonGroovy.runTestCommand(platform, project, jobName, test_marks, skipHostTest)
}

buildProject(prj, formatCheck, nodes.dockerArray, compileCommand, testCommand, null)
Expand Down
1 change: 1 addition & 0 deletions HostLibraryTests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ set(test_sources ${test_sources}
DataTypes_test.cpp
EmbeddedData_test.cpp
KernelArguments_test.cpp
Predicates_test.cpp
ProjectedPerformance_test.cpp
DecisionTree_test.cpp
TensorDescriptor_test.cpp
Expand Down
68 changes: 68 additions & 0 deletions HostLibraryTests/Predicates_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*******************************************************************************
*
* MIT License
*
* Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*******************************************************************************/

#include <gtest/gtest.h>

#include <Tensile/ContractionProblemPredicates.hpp>

TEST(Predicates, ArithmeticIntensity)
{
using namespace Tensile;

ContractionProblem a = ContractionProblem::GEMM(
false, true, 1000, 1500, 500, 2000, 2000, 2000, 3.0, false, 1); // 88.4
ContractionProblem b = ContractionProblem::GEMM(
false, true, 500, 1000, 1000, 2000, 2000, 2000, 0.0, false, 5); // 125
ContractionProblem c = ContractionProblem::GEMM(
false, true, 2000, 100, 2000, 2000, 2000, 2000, 1.0, false, 10); // 43.5
ContractionProblem d = ContractionProblem::GEMM(
false, true, 2000, 2000, 450, 2000, 2000, 2000, 2.0, false, 1); // 92.04

auto pg1 = std::make_shared<Predicates::Contraction::AIGreaterThanEqual>(100);
auto pg2 = std::make_shared<Predicates::Contraction::AIGreaterThanEqual>(75);
auto pl1 = std::make_shared<Predicates::Contraction::AILessThanEqual>(100);
auto pl2 = std::make_shared<Predicates::Contraction::AILessThanEqual>(75);

EXPECT_EQ(false, (*pg1)(a));
EXPECT_EQ(true, (*pg2)(a));
EXPECT_EQ(true, (*pl1)(a));
EXPECT_EQ(false, (*pl2)(a));

EXPECT_EQ(true, (*pg1)(b));
EXPECT_EQ(true, (*pg2)(b));
EXPECT_EQ(false, (*pl1)(b));
EXPECT_EQ(false, (*pl2)(b));

EXPECT_EQ(false, (*pg1)(c));
EXPECT_EQ(false, (*pg2)(c));
EXPECT_EQ(true, (*pl1)(c));
EXPECT_EQ(true, (*pl2)(c));

EXPECT_EQ(false, (*pg1)(d));
EXPECT_EQ(true, (*pg2)(d));
EXPECT_EQ(true, (*pl1)(d));
EXPECT_EQ(false, (*pl2)(d));
}
Loading

0 comments on commit d0314ce

Please sign in to comment.