This repository has been archived by the owner on Aug 16, 2024. It is now read-only.
forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add checks for structured in-place operations. (pytorch#65686)
Summary: Pull Request resolved: pytorch#65686 Fixes: pytorch#57827 This PR introduces `check_inplace` function. It contains some common checks for all structured in-place operators (e.g. dtype, device, and sizes). `set_output` method calls `check_inplace` on in-place specializations of structured kernels. Besides that, it also: - adds overlap assertions for both in-place and out-of-place overloads - remove in-place operator specific `TORCH_CHECK` around the code base Test Plan: Imported from OSS Reviewed By: albanD Differential Revision: D31234063 Pulled By: ezyang fbshipit-source-id: fa3b45775af7812e07a282e7cae00b68caf0fdb0
- Loading branch information
1 parent
93852bb
commit 51f1569
Showing
4 changed files
with
25 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters