benchmark icon indicating copy to clipboard operation
benchmark copied to clipboard

Summary Metadata Validation - no_grad checks

Open aaronenyeshi opened this issue 4 years ago • 0 comments

After PR #526 lands, we need to fix these:

# FIXME: Models will use context "with torch.no_grad():", so the lifetime of no_grad will end after the eval().
# FIXME: Must incorporate this "torch.is_grad_enabled()" inside of actual eval() func.
# self._details.metadata["eval_nograd"] = not self.worker.load_stmt("torch.is_grad_enabled()")

To enable metadata checks for no_grad, we need to check inside of no_grad() context. This can be added after PR #486, which will allow us to capture no_grad (using step_fn()) inside the context of with torch.no_grad().

aaronenyeshi avatar Oct 26 '21 20:10 aaronenyeshi