-
-
Notifications
You must be signed in to change notification settings - Fork 607
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding device objects for selecting GPU backends (and defaulting to C…
…PU if none exists). (#2297) * Adding structs for cpu and gpu devices. * Adding implementation of `Flux.get_device()`, which returns the most appropriate GPU backend (or CPU, if nothing is available). * Adding docstrings for the new device types, and the `get_device` function. * Adding `CPU` to the list of supported backends. Made corresponding changes in `gpu(x)`. Adding more details in docstring of `get_device`. * Using `julia-repl` instead of `jldoctest`, and `@info` instead of `@warn`. * Adding `DataLoader` functionality to device objects. * Removing pkgids and defining new functions to check whether backend is available and functional. * Correcting typographical errors, and removing useless imports. * Adding `deviceID` to each device struct, and moving struct definitions to package extensions. * Adding tutorial for using device objects in manual. * Adding docstring for `get_device` in manual, and renaming internal functions. * Minor change in docs. * Removing structs from package extensions as it is bad practice. * Adding more docstrings in manual. * Removing redundant log messages. * Adding kwarg to `get_device` for verbose output. * Setting `deviceID` to `nothing` if GPU is not functional. * Adding basic tests for device objects. * Fixing minor errors in package extensions and tests. * Minor fix in tests + docs. * Moving device tests to extensions, and adding a basic data transfer test. * Moving all device tests in single file per extension.
- Loading branch information
1 parent
c565052
commit c2bd39d
Showing
10 changed files
with
413 additions
and
5 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
Oops, something went wrong.