Skip to content

Commit 461bd2c

Browse files
jbschlosserpytorchmergebot
authored andcommitted
Update nested tensor warning to recommend layout=torch.jagged (pytorch#142140)
Pull Request resolved: pytorch#142140 Approved by: https://github.com/YuqingJ
1 parent 90052a8 commit 461bd2c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

aten/src/ATen/NestedTensorImpl.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,9 @@ NestedTensorImpl::NestedTensorImpl(
177177
C10_LOG_API_USAGE_ONCE("torch.NestedTensor");
178178
TORCH_WARN_ONCE(
179179
"The PyTorch API of nested tensors is in prototype stage and will change "
180-
"in the near future.");
180+
"in the near future. We recommend specifying layout=torch.jagged when constructing "
181+
"a nested tensor, as this layout receives active development, has better operator "
182+
"coverage, and works with torch.compile.");
181183
auto storage_device = storage_.device();
182184
TORCH_INTERNAL_ASSERT(
183185
storage_device.is_cpu() || storage_device.is_cuda() || storage_device.is_xpu() || storage_device.is_privateuseone(),

0 commit comments

Comments
 (0)