Make activation checkpointing interface less restrictive (#1413)
Make activation checkpointing interface less restrictive (#1413)

Summary: Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/1413

Test Plan: Imported from OSS

Reviewed By: ngoyal2707

Differential Revision: D24833476

Pulled By: myleott

fbshipit-source-id: 380ea7e05c7b188086b2b10c15120ea6636e0a3e

pytorch/fairseq,pytorch/fairseq,pytorch/fairseq