mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-04 18:40:28 +00:00
[feat] refactored extension module (#5298)
* [feat] refactored extension module * polish * polish * polish * polish * polish * polish * polish * polish * polish * polish
This commit is contained in:
@@ -21,6 +21,12 @@ class CudaAccelerator(BaseAccelerator):
|
||||
# =======================
|
||||
# device APIs
|
||||
# =======================
|
||||
def get_version(self) -> str:
|
||||
"""
|
||||
Return the version of the accelerator which torch is built against.
|
||||
"""
|
||||
return torch.version.cuda
|
||||
|
||||
def get_current_device(self) -> torch.device:
|
||||
"""
|
||||
Return the current device.
|
||||
|
Reference in New Issue
Block a user