[PyTorch] Inline RecordFunctionCallback::shouldRun (#48286)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/48286
RecordFunction initialization is a hot path. shouldRun often does little enough work that the function prologue takes a significant proportion of its time. So, this diff forces it to be inline.
ghstack-source-id: 117892387
Test Plan: FB-internal benchmarks
Reviewed By: ezyang
Differential Revision: D25108879
fbshipit-source-id: 7121413e714c5ca22c8bf10c1d2535a878c15aec