-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Runtime] Allow query of available device memory through DeviceAPI (#…
…16994) * [Runtime] Allow query of available device memory through DeviceAPI Prior to this commit, the total device memory could be queried through the `DeviceAPI` interface, but the currently available device memory could not. This functionality may be useful for debugging, or for validating available memory prior to model execution. This commit implements the property `Device.available_global_memory`, which queries the `DeviceAttrKind::kAvailableGlobalMemory`. Support for this query, like all device attribute queries, may vary across different backends, and will return `None` for backends that do not support this query. This commit only currently implements support for `kAvailableGlobalMemory` for TVM's Cuda backend. * Updated docstring to fix copy/paste typo * Lint fix, cover all enum values in case/switch * Fix rocm compilation warning
- Loading branch information
1 parent
afb6416
commit 3cd6673
Showing
7 changed files
with
86 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
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