[PyTorch] Stringize kernel tag names consistently during macro expansion and require all tag names to be a compile time character array (#46074)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/46074
I found 2 instances where the NAME parameter passed in to the dispatch macros is not a C++ string (constant) (i.e. double quoted compile time string).
In one instance it is a single quoted multi-character constant (I don't know what this resolves to in practice), and in the other instance, it is an unquoted identified generated as a result of concatenating 2 identifiers using the `##` operator.
In addition, I found 2 instances where the `NAME` of the tag passed in is not a constant character array, but an `std::string` variable instead. I am changing it to a constant character array with the same name as the variable name (earlier). For the purposes of any code using this data, eveything remains the same since the code was string-izing the value anyway using `#NAME` so it would get the name of the variable and not the contents.
ghstack-source-id: 113928208
Test Plan: I have a commit (not part of this change set) that attempts to print the `NAME` argument passed in to the various dispatch macros to be able to do some analysis. These weren't expanding correctly for the uses cases that are fixed in this diff.
Reviewed By: ezyang
Differential Revision: D24211393
fbshipit-source-id: 28953d9f859315b371a60ae34b19671720209c99