Skip to content

Commit be01470

Browse files
committed
Bug fix in include/CL/sycl/detail/program_impl.hpp, due to error
introduced during rebase-conflict resolution. Bug fix in unittests/pi/PlatformTest.cpp. Signed-off-by: Garima Gupta <[email protected]>
1 parent 19882d4 commit be01470

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

sycl/include/CL/sycl/detail/program_impl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ class program_impl {
441441
KernelName);
442442
} else {
443443
RT::PiResult Err =
444-
PI_CALL_RESULT(piKernelCreate)(Program, KernelName.c_str(), &Kernel);
444+
PI_CALL_NOCHECK(piKernelCreate)(Program, KernelName.c_str(), &Kernel);
445445
if (Err == PI_RESULT_INVALID_KERNEL_NAME) {
446446
throw invalid_object_error(
447447
"This instance of program does not contain the kernel requested");

sycl/unittests/pi/PlatformTest.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class PlatformTest : public ::testing::Test {
3232
// Initialize the logged number of platforms before the following assertion.
3333
RecordProperty(platform_count_key, platform_count);
3434

35-
ASSERT_EQ(PI_CALL_NOCHECK(piPlatformsGet)(0, 0, &platform_count),
35+
ASSERT_EQ((PI_CALL_NOCHECK(piPlatformsGet)(0, nullptr, &platform_count)),
3636
PI_SUCCESS);
3737

3838
// Overwrite previous log value with queried number of platforms.
@@ -49,8 +49,8 @@ class PlatformTest : public ::testing::Test {
4949

5050
_platforms.resize(platform_count, nullptr);
5151

52-
ASSERT_EQ(PI_CALL_NOCHECK(piPlatformsGet)(_platforms.size(),
53-
_platforms.data(), nullptr),
52+
ASSERT_EQ((PI_CALL_NOCHECK(piPlatformsGet)(_platforms.size(),
53+
_platforms.data(), nullptr)),
5454
PI_SUCCESS);
5555
}
5656
};
@@ -63,14 +63,14 @@ TEST_F(PlatformTest, piPlatformsGet) {
6363
TEST_F(PlatformTest, piPlatformGetInfo) {
6464
auto get_info_test = [](pi_platform platform, _pi_platform_info info) {
6565
size_t reported_string_length = 0;
66-
EXPECT_EQ(PI_CALL_NOCHECK(piPlatformGetInfo)(platform, info, 0u, nullptr,
67-
&reported_string_length),
66+
EXPECT_EQ((PI_CALL_NOCHECK(piPlatformGetInfo)(platform, info, 0u, nullptr,
67+
&reported_string_length)),
6868
PI_SUCCESS);
6969

7070
// Create a larger result string to catch overwrites.
7171
std::vector<char> param_value(reported_string_length * 2u, '\0');
72-
EXPECT_EQ(PI_CALL_NOCHECK(piPlatformGetInfo)(
73-
platform, info, param_value.size(), param_value.data(), 0u),
72+
EXPECT_EQ((PI_CALL_NOCHECK(piPlatformGetInfo)(
73+
platform, info, param_value.size(), param_value.data(), nullptr)),
7474
PI_SUCCESS)
7575
<< "piPlatformGetInfo for " << RT::platformInfoToString(info)
7676
<< " failed.\n";

0 commit comments

Comments
 (0)