benchmark
b30d690b - Some minor type stub improvements (#118529)

Commit
2 years ago
Some minor type stub improvements (#118529) Summary: I was just playing around with improving the typing of symbolic_shapes. The PR is not "complete" but I in particular wanted to get feedback on whether or not people liked making ValueRanges Generic; it seems that distinguishing if you have an Expr ValueRange or a SympyBoolean ValueRange is a lot of trouble for downstream. Using TypeGuard, we can perform refinements on the generic parameter inside methods, although we still have to cast back to ValueRange[T] due to https://github.com/python/mypy/issues/14425#issuecomment-1914852707 Signed-off-by: Edward Z. Yang <ezyang@meta.com> X-link: https://github.com/pytorch/pytorch/pull/118529 Approved by: https://github.com/Skylion007 Reviewed By: atalman Differential Revision: D53436982 Pulled By: ezyang fbshipit-source-id: a31a94137df69eae5ddc86396580655ff478b8a2
Author
Parents
Loading