Skip to content

Commit

Permalink
Update DeviceProperties.h
Browse files Browse the repository at this point in the history
  • Loading branch information
xytintel authored Aug 28, 2024
1 parent 71d212d commit 242ab85
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/comm/DeviceProperties.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,5 +190,11 @@ uint32_t syclNativeVectorWidth(
"Invalid data type to fetch native vector width!");
}

static inline bool syclHasFloat64(
at::DeviceIndex dev_id = at::xpu::getDeviceIndexOfCurrentQueue()) {
auto* dev_prop = at::xpu::getDeviceProperties(dev_id);
return dev_prop->has_fp64;
}

} // namespace sycl
} // namespace xpu

0 comments on commit 242ab85

Please sign in to comment.