torch.fx.experimental.symbolic_shapes.guard_size_oblivious
-
torch.fx.experimental.symbolic_shapes.guard_size_oblivious(expr)[source][source]
以一种大小无关的方式对符号布尔表达式进行守卫。这通常用于非守卫测试会导致对编译时不知道其值的依赖数据值的守卫。以这种方式测试守卫时,我们的行为可能与常规 PyTorch 语义不同。有关更多信息,请参阅 https://github.com/pytorch/pytorch/pull/118579
- 返回类型:
布尔型