Skip to content

Commit 5dd9047

Browse files
committed
fix local/private tests
1 parent e74b324 commit 5dd9047

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

source/loader/layers/sanitizer/asan_interceptor.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,8 @@ ur_result_t SanitizerInterceptor::prepareLaunch(
794794
// Write shadow memory offset for local memory
795795
if (Options().DetectLocals) {
796796
// CPU needn't this
797-
if (DeviceInfo->Type == DeviceType::GPU_PVC) {
797+
if (DeviceInfo->Type == DeviceType::GPU_PVC ||
798+
DeviceInfo->Type == DeviceType::GPU_DG2) {
798799
const size_t LocalMemorySize =
799800
GetDeviceLocalMemorySize(DeviceInfo->Handle);
800801
const size_t LocalShadowMemorySize =
@@ -834,7 +835,8 @@ ur_result_t SanitizerInterceptor::prepareLaunch(
834835
if (Options().DetectPrivates) {
835836
if (DeviceInfo->Type == DeviceType::CPU) {
836837
LaunchInfo.Data->PrivateShadowOffset = DeviceInfo->ShadowOffset;
837-
} else if (DeviceInfo->Type == DeviceType::GPU_PVC) {
838+
} else if (DeviceInfo->Type == DeviceType::GPU_PVC ||
839+
DeviceInfo->Type == DeviceType::GPU_DG2) {
838840
const size_t PrivateShadowMemorySize =
839841
(NumWG * ASAN_PRIVATE_SIZE) >> ASAN_SHADOW_SCALE;
840842

0 commit comments

Comments
 (0)