[Bug 54887] Add support for SampleGrad() function