mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 18:06:32 +08:00
Improve getGRFsPerThread helper
Change-Id: I8d4d2ce35ca6f6054e74930e6a936fc2e49bfcc3 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
49aac737a7
commit
5751b5eb27
@@ -18,19 +18,26 @@
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
TEST(LocalID, GivenSimd8WhenGettingGrfsPerThreadThenOneIsReturned) {
|
||||
using LocalIdTests = ::testing::Test;
|
||||
|
||||
HWTEST_F(LocalIdTests, GivenSimd8WhenGettingGrfsPerThreadThenOneIsReturned) {
|
||||
uint32_t simd = 8;
|
||||
EXPECT_EQ(1u, getGRFsPerThread(simd));
|
||||
EXPECT_EQ(1u, getGRFsPerThread(simd, 32));
|
||||
}
|
||||
|
||||
TEST(LocalID, GivenSimd16WhenGettingGrfsPerThreadThenOneIsReturned) {
|
||||
HWTEST_F(LocalIdTests, GivenSimd16WhenGettingGrfsPerThreadThenOneIsReturned) {
|
||||
uint32_t simd = 16;
|
||||
EXPECT_EQ(1u, getGRFsPerThread(simd));
|
||||
EXPECT_EQ(1u, getGRFsPerThread(simd, 32));
|
||||
}
|
||||
|
||||
TEST(LocalID, GivenSimd32WhenGettingGrfsPerThreadThenTwoIsReturned) {
|
||||
HWTEST_F(LocalIdTests, GivenSimd32WhenGettingGrfsPerThreadThenTwoIsReturned) {
|
||||
uint32_t simd = 32;
|
||||
EXPECT_EQ(2u, getGRFsPerThread(simd));
|
||||
EXPECT_EQ(2u, getGRFsPerThread(simd, 32));
|
||||
}
|
||||
|
||||
HWTEST_F(LocalIdTests, GivenSimd32AndNon32GrfSizeWhenGettingGrfsPerThreadThenTwoIsReturned) {
|
||||
uint32_t simd = 32;
|
||||
EXPECT_EQ(1u, getGRFsPerThread(simd, 33));
|
||||
}
|
||||
|
||||
TEST(LocalID, GivenSimd32AndLws33WhenGettingThreadsPerWorkgroupThenTwoIsReturned) {
|
||||
|
||||
Reference in New Issue
Block a user