Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ivalue] operator<<: don't error on invalid IValue tags (#112232)
While running the profiler, we observed a scenario where we observe IValues with invalid tags. Specifically, we try to convert the IValue to a string here: https://github.com/pytorch/pytorch/blob/d3bf6803b62c79f1dafd1eec49b4bd65d5a27697/torch/csrc/profiler/util.cpp#L306-L308 and in the scenario with invalid IValues, an exception gets thrown here, in `operator<<`. https://github.com/pytorch/pytorch/blob/d3bf6803b62c79f1dafd1eec49b4bd65d5a27697/aten/src/ATen/core/ivalue.cpp#L864 IMO, `<<` shouldn't error if the IValue is bad; instead, we should just print that the IValue tag is invalid. Differential Revision: [D50760040](https://our.internmc.facebook.com/intern/diff/D50760040) Pull Request resolved: #112232 Approved by: https://github.com/albanD
- Loading branch information