Skip to content
Open
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,11 @@ else()
set(CMAKE_NEWLINE "\n")
endif()

if (MSVC)
add_compile_options(/W4)
else()
add_compile_options(-Wsign-compare -Wnarrowing)
endif()

option(ENABLE_ZESYSMAN
"Enables build of zesysman"
Expand Down
4 changes: 2 additions & 2 deletions conformance_tests/core/test_barrier/src/test_barrier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ void RunAppendingBarrierWithSignalEventAndWaitEvents(bool isImmediate) {
for (auto &ev : events) {
lzt::signal_event_from_host(ev);
}
for (int i = 0; i < events.size(); i++) {
for (size_t i = 0U; i < events.size(); i++) {
ASSERT_EQ(events[i], events_initial[i]);
}
ep.destroy_events(events);
Expand Down Expand Up @@ -233,7 +233,7 @@ void RunAppendingMemoryRangesBarrierWaitEvents(bool isImmediate) {
auto wait_events_initial = waiting_events;
AppendMemoryRangesBarrierTest(context, device, bundle.list, nullptr,
waiting_events);
for (int i = 0; i < waiting_events.size(); i++) {
for (size_t i = 0U; i < waiting_events.size(); i++) {
ASSERT_EQ(waiting_events[i], wait_events_initial[i]);
}
ep.destroy_events(waiting_events);
Expand Down
10 changes: 5 additions & 5 deletions conformance_tests/core/test_cmdlist/src/test_cmdlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,17 +343,17 @@ LZT_TEST(zeCommandListReuseTests,
lzt::append_memory_copy(cmdlist_mem_zero, host_buffer, device_buffer, size);
lzt::close_command_list(cmdlist_mem_zero);

const int num_execute = 5;
for (int i = 0; i < num_execute; i++) {
const uint32_t num_execute = 5;
for (uint32_t i = 0U; i < num_execute; i++) {
lzt::execute_command_lists(cmdq, 1, &cmdlist_mem_zero, nullptr);
lzt::synchronize(cmdq, UINT64_MAX);
for (int j = 0; j < size; j++)
for (size_t j = 0U; j < size; j++)
ASSERT_EQ(static_cast<uint8_t *>(host_buffer)[j], 0x0)
<< "Memory Set did not match.";

lzt::execute_command_lists(cmdq, 1, &cmdlist_mem_set, nullptr);
lzt::synchronize(cmdq, UINT64_MAX);
for (int j = 0; j < size; j++)
for (size_t j = 0U; j < size; j++)
ASSERT_EQ(static_cast<uint8_t *>(host_buffer)[j], 0x1)
<< "Memory Set did not match.";
}
Expand Down Expand Up @@ -1068,7 +1068,7 @@ RunAppendLaunchKernelEventLoop(cmdListVec cmdlist, cmdQueueVec cmdqueue,
}

constexpr size_t size = 16;
for (int i = 1; i <= cmdlist.size(); i++) {
for (size_t i = 1; i <= cmdlist.size(); i++) {
LOG_INFO << "Testing " << i << " command list(s)";
func(cmdlist, cmdqueue, event, i, size);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ LZT_TEST_F(
GTEST_SKIP() << "Extension " << ZE_EVENT_POOL_COUNTER_BASED_EXP_NAME
<< " not supported";
}
for (int i = 1; i <= cmdlist.size(); i++) {
for (size_t i = 1; i <= cmdlist.size(); i++) {
LOG_INFO << "Running " << i << " command list(s)";
RunAppendLaunchKernelEvent(cmdlist, event0, i, false);
}
Expand All @@ -438,7 +438,7 @@ LZT_TEST_F(
GTEST_SKIP() << "Extension " << ZE_EVENT_POOL_COUNTER_BASED_EXP_NAME
<< " not supported";
}
for (int i = 1; i <= cmdlist.size(); i++) {
for (size_t i = 1; i <= cmdlist.size(); i++) {
LOG_INFO << "Running " << i << " command list(s)";
RunAppendLaunchKernelEvent(cmdlist, event0, i, true);
}
Expand Down
Loading
Loading