Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions libdevice/include/asan_libdevice.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// NOTE This file should be sync with
// unified-runtime/source/loader/layers/sanitizer/device_sanitizer_report.hpp

enum class DeviceType : uint32_t { UNKNOWN = 0, CPU, GPU_PVC, GPU_DG2 };
enum class DeviceSanitizerErrorType : int32_t {
UNKNOWN,
OUT_OF_BOUNDS,
Expand Down Expand Up @@ -66,14 +67,20 @@ struct LocalArgsInfo {
constexpr std::size_t ASAN_MAX_NUM_REPORTS = 10;

struct LaunchInfo {
uintptr_t GlobalShadowOffset = 0;
uintptr_t GlobalShadowOffsetEnd = 0;

uintptr_t PrivateShadowOffset = 0;
uintptr_t PrivateShadowOffsetEnd = 0;

uintptr_t LocalShadowOffset = 0;
uintptr_t LocalShadowOffsetEnd = 0;

uint32_t NumLocalArgs = 0;
LocalArgsInfo *LocalArgs = nullptr; // Ordered by ArgIndex
uint32_t NumLocalArgs = 0;

DeviceType DeviceTy = DeviceType::UNKNOWN;
uint32_t Debug = 0;

DeviceSanitizerReport SanitizerReport[ASAN_MAX_NUM_REPORTS];
};
Expand Down Expand Up @@ -106,13 +113,6 @@ const int kPrivateLeftRedzoneMagic = (char)0xf1;
const int kPrivateMidRedzoneMagic = (char)0xf2;
const int kPrivateRightRedzoneMagic = (char)0xf3;

constexpr auto kSPIR_AsanShadowMemoryGlobalStart =
"__AsanShadowMemoryGlobalStart";
constexpr auto kSPIR_AsanShadowMemoryGlobalEnd = "__AsanShadowMemoryGlobalEnd";

constexpr auto kSPIR_DeviceType = "__DeviceType";
constexpr auto kSPIR_AsanDebug = "__AsanDebug";

constexpr auto kSPIR_AsanDeviceGlobalCount = "__AsanDeviceGlobalCount";
constexpr auto kSPIR_AsanDeviceGlobalMetadata = "__AsanDeviceGlobalMetadata";

Expand Down
2 changes: 0 additions & 2 deletions libdevice/include/sanitizer_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,5 @@
// Treat this header as system one to workaround frontend's restriction
#pragma clang system_header

enum DeviceType : uint64_t { UNKNOWN, CPU, GPU_PVC, GPU_DG2 };

extern SPIR_GLOBAL_VAR __SYCL_GLOBAL__ uint64_t *__SYCL_LOCAL__
__AsanLaunchInfo;
Loading
Loading