[PyTorch] Make SROpFunctor a raw function pointer (#50395)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/50395

There's no need for these to be `std::function`.
ghstack-source-id: 119684828

Test Plan: CI

Reviewed By: hlu1

Differential Revision: D25874187

fbshipit-source-id: e9fa3fbc0dca1219ed13904ca704670ce24f7cc3
diff --git a/torch/csrc/jit/runtime/static/ops.h b/torch/csrc/jit/runtime/static/ops.h
index f2389e2..efbb80c 100644
--- a/torch/csrc/jit/runtime/static/ops.h
+++ b/torch/csrc/jit/runtime/static/ops.h
@@ -7,7 +7,7 @@
 namespace jit {
 
 using SROperator = std::function<void(ProcessedNode*)>;
-using SROpFunctor = std::function<SROperator(Node* n)>;
+using SROpFunctor = SROperator (*)(Node* n);
 struct SROperatorFunctor {
   virtual SROperator Generate(Node*) {
     std::function<void(ProcessedNode*)> out;