Enable jit tracing to parametrization and add jit tests (#60969)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/60969
This PR fixes the tracing in the parametrizations.
The current resolution is that when tracing is performed while caching is enabled, we throw an error.
Without caching, the tracing should work properly (tests added).
Currently, the parametrizations don't support scripting.
This PR introduces the same logic as with the tracing (throw error if caching).
However, the scripting itself cannot enabled due to the use of the generator expressions in the parametrizations.
Added TODO to fix it.
Test Plan: Imported from OSS
Reviewed By: albanD
Differential Revision: D29462887
Pulled By: z-a-f
fbshipit-source-id: 49721d3059be58f36055d1c374080df41a748d66