Skip to content

Commit ae878f5

Browse files
committed
skip kernel annotation on CPU
* Kernel annotation is skipped - seems like an OpenCL CPU runtime issue https://community.intel.com/t5/OpenCL-for-CPU/OpenCL-Using-USM-on-Intel-CPU-Runtime-along-with/m-p/1621136#M7350 intel/compute-runtime#748 * Remove LLVM15 Testing from CI * Re-enable OpenCL CPU CI
1 parent b3fbd69 commit ae878f5

3 files changed

Lines changed: 25 additions & 5 deletions

File tree

scripts/unit_tests.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,4 +194,12 @@ dgpu_level0_result=$(check_tests dgpu_level0_make_check_result.txt)
194194
run_tests dgpu opencl
195195
dgpu_opencl_result=$(check_tests dgpu_opencl_make_check_result.txt)
196196

197-
exit $((igpu_opencl_result || dgpu_opencl_result || igpu_level0_result || dgpu_level0_result))
197+
# Run tests for cpu level0 only if the CLANG version is llvm/18 and the build type is RELEASE
198+
if [ "$CLANG" = "llvm/18" ] && [ "$build_type" = "RELEASE" ]; then
199+
run_tests cpu level0
200+
cpu_level0_result=$(check_tests cpu_level0_make_check_result.txt)
201+
exit $((igpu_opencl_result || dgpu_opencl_result || igpu_level0_result || dgpu_level0_result || cpu_level0_result))
202+
else
203+
exit $((igpu_opencl_result || dgpu_opencl_result || igpu_level0_result || dgpu_level0_result))
204+
fi
205+

src/backend/OpenCL/CHIPBackendOpenCL.cc

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ CHIPCallbackDataOpenCL::CHIPCallbackDataOpenCL(hipStreamCallback_t TheCallback,
313313

314314
// EventMonitorOpenCL
315315
// ************************************************************************
316-
EventMonitorOpenCL::EventMonitorOpenCL() : chipstar::EventMonitor(){};
316+
EventMonitorOpenCL::EventMonitorOpenCL() : chipstar::EventMonitor() {};
317317

318318
void EventMonitorOpenCL::monitor() {
319319
logTrace("EventMonitorOpenCL::monitor()");
@@ -1263,8 +1263,13 @@ CHIPQueueOpenCL::launchImpl(chipstar::ExecItem *ExecItem) {
12631263
LOCK(Backend->DubiousLockOpenCL);
12641264
#endif
12651265

1266-
auto AllocationsToKeepAlive = annotateIndirectPointers(
1267-
*OclContext, Kernel->getModule()->getInfo(), KernelHandle);
1266+
std::unique_ptr<std::vector<std::shared_ptr<void>>> AllocationsToKeepAlive;
1267+
// Disable annotation for CPU device. Runtime errror.
1268+
// https://community.intel.com/t5/OpenCL-for-CPU/OpenCL-Using-USM-on-Intel-CPU-Runtime-along-with/m-p/1621136#M7350
1269+
if (ChipEnvVars.getDevice().getType() != DeviceType::CPU) {
1270+
AllocationsToKeepAlive = annotateIndirectPointers(
1271+
*OclContext, Kernel->getModule()->getInfo(), KernelHandle);
1272+
}
12681273

12691274
auto [EventsToWait, EventLocks] = getSyncQueuesLastEvents(LaunchEvent, false);
12701275
std::vector<cl_event> SyncQueuesEventHandles = getOpenCLHandles(EventsToWait);
@@ -1409,7 +1414,7 @@ CHIPQueueOpenCL::memCopyAsyncImpl(void *Dst, const void *Src, size_t Size,
14091414
#ifdef CHIP_DUBIOUS_LOCKS
14101415
LOCK(Backend->DubiousLockOpenCL)
14111416
#endif
1412-
auto [EventsToWait, EventLocks] = getSyncQueuesLastEvents(Event, false);
1417+
auto [EventsToWait, EventLocks] = getSyncQueuesLastEvents(Event, false);
14131418
std::vector<cl_event> SyncQueuesEventHandles =
14141419
getOpenCLHandles(EventsToWait);
14151420
auto *Ctx = getContext();

tests/known_failures.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,13 +412,20 @@ ANY:
412412
CatchMemLeak1: ''
413413
hipMemset_Unit_hipMemsetAsync_SetMemoryWithOffset_Helgrind: 'False positives from L0 helper thread'
414414
OPENCL_CPU:
415+
hipBlas-sgemm: 'GEMM SYCL exception: Backends mismatch'
415416
2d_shuffle: ''
416417
Unit_hipClassKernel_Value: ''
417418
Unit_hipMemsetFunctional_PartialSet_1D: ''
418419
fp16: ''
419420
hipConstantTestDeviceSymbol: ''
420421
hipDynamicShared2: ''
421422
unroll: ''
423+
Unit_hipMemsetAsync_VerifyExecutionWithKernel: 'Failed'
424+
Unit_hipDeviceSynchronize_Functional: 'Failed'
425+
Unit_hipTextureObj1DCheckRGBAModes - array: 'Timeout'
426+
Unit_hipTextureObj1DCheckRGBAModes - buffer: 'Timeout'
427+
Unit_hipTextureObj2DCheckRGBAModes: 'Failed'
428+
hipMemset_Unit_hipMemsetAsync_SetMemoryWithOffset_Helgrind: 'Failed'
422429
OPENCL_GPU:
423430
Unit_hipEvent: ''
424431
TestStlFunctionsDouble: ''

0 commit comments

Comments
 (0)