extend gradient to take an ADType argument
#2645
Merged
gradient to take an ADType argument
#2645