cutorch compatibility for adagrad