Skip to content
Open
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
4 changes: 2 additions & 2 deletions sdk/src/utils/ze_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ inline uint64_t GetDeviceTimestampMask(ze_device_handle_t device) {
o_api_string.c_str());
};
PTI_ASSERT(status == ZE_RESULT_SUCCESS);
return ((props.kernelTimestampValidBits == 64) ? std::numeric_limits<uint64_t>::max()
return ((props.kernelTimestampValidBits == 64) ? (std::numeric_limits<uint64_t>::max)()
: ((1ull << props.kernelTimestampValidBits) - 1ull));
}

Expand All @@ -533,7 +533,7 @@ inline uint64_t GetMetricTimestampMask(ze_device_handle_t device) {
if ((devicemask == 0x5600) || (devicemask == 0x4F00) || (devicemask == 0x0B00)) {
return (1ull << (props.kernelTimestampValidBits - 1)) - 1ull;
} else {
return ((props.kernelTimestampValidBits == 64) ? std::numeric_limits<uint64_t>::max()
return ((props.kernelTimestampValidBits == 64) ? (std::numeric_limits<uint64_t>::max)()
: ((1ull << props.kernelTimestampValidBits) - 1ull));
}
#endif
Expand Down
4 changes: 2 additions & 2 deletions tools/oneprof/prof_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class ProfOptions {
}

std::string GetLogFileName(
uint32_t pid = std::numeric_limits<uint32_t>::max()) const {
uint32_t pid = (std::numeric_limits<uint32_t>::max)()) const {
if (log_file_.empty()) {
return std::string();
}
Expand All @@ -74,7 +74,7 @@ class ProfOptions {
result << log_file_.substr(0, pos);
}

if (pid == std::numeric_limits<uint32_t>::max()) {
if (pid == (std::numeric_limits<uint32_t>::max)()) {
pid = utils::GetPid();
}
result << "." + std::to_string(pid);
Expand Down
4 changes: 2 additions & 2 deletions utils/ze_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ inline uint64_t GetDeviceTimestampMask(ze_device_handle_t device) {
ze_device_properties_t props{ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES_1_2, };
ze_result_t status = zeDeviceGetProperties(device, &props);
PTI_ASSERT(status == ZE_RESULT_SUCCESS);
return ((props.kernelTimestampValidBits == 64) ? std::numeric_limits<uint64_t>::max()
return ((props.kernelTimestampValidBits == 64) ? (std::numeric_limits<uint64_t>::max)()
: ((1ull << props.kernelTimestampValidBits) - 1ull));
}

Expand All @@ -372,7 +372,7 @@ inline uint64_t GetMetricTimestampMask(ze_device_handle_t device) {
return (1ull << (props.kernelTimestampValidBits - 1)) - 1ull;
}
else {
return ((props.kernelTimestampValidBits == 64) ? std::numeric_limits<uint64_t>::max()
return ((props.kernelTimestampValidBits == 64) ? (std::numeric_limits<uint64_t>::max)()
: ((1ull << props.kernelTimestampValidBits) - 1ull));
}
#endif
Expand Down