support counter-based fused rowwise adagrad (#66177)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/66177
As title, with additional change to enable counter for SparseAdagrad.
Test Plan:
buck test //caffe2/caffe2/fb/net_transforms/tests:fuse_sparse_ops_test
Testing with canary packages
baseline: f297789852
counter run: f297789912
Reviewed By: jspark1105
Differential Revision: D30903029
fbshipit-source-id: 3ed89a7da409fd820fd0b44950407c20fa2018a5