Skip to content

Commit 9bf5973

Browse files
authored
Use std::string_view (#1780)
Follows #1619 and uses std::string_view Signed-off-by: cyy <[email protected]>
1 parent 35648db commit 9bf5973

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/ATen/native/xpu/Indexing.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Tensor& index_select_out_xpu(
2828
c10::impl::check_and_update_common_device(
2929
common_device, out, "xpu::index_select_out", "out");
3030

31-
static constexpr string_view DIM_WARNING =
31+
static constexpr std::string_view DIM_WARNING =
3232
"Tensor too large or too many (> 12) dimensions";
3333
at::assert_no_internal_overlap(out);
3434
at::assert_no_overlap(out, self);

src/ATen/native/xpu/sycl/Indexing.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ static inline void index_copy_impl(
845845
int64_t dim,
846846
const Tensor& indices,
847847
const Tensor& source) {
848-
static constexpr string_view DIM_WARNING =
848+
static constexpr std::string_view DIM_WARNING =
849849
"Tensor too large or too many (> 12) dimensions";
850850

851851
TORCH_CHECK(dst.dim() <= XPU_MAX_TENSORINFO_DIMS, DIM_WARNING);

0 commit comments

Comments
 (0)