mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-06-28 16:28:10 +00:00
[format] applied code formatting on changed files in pull request 4021 (#4022)
Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
parent
160c64c645
commit
a52f62082d
@ -1,11 +1,12 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- encoding: utf-8 -*-
|
# -*- encoding: utf-8 -*-
|
||||||
|
|
||||||
|
from contextlib import contextmanager
|
||||||
|
|
||||||
import torch.nn as nn
|
import torch.nn as nn
|
||||||
|
|
||||||
from colossalai.context import ParallelMode
|
from colossalai.context import ParallelMode
|
||||||
from colossalai.core import global_context as gpc
|
from colossalai.core import global_context as gpc
|
||||||
from contextlib import contextmanager
|
|
||||||
|
|
||||||
|
|
||||||
class ParallelLayer(nn.Module):
|
class ParallelLayer(nn.Module):
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
from colossalai.device.device_mesh import DeviceMesh
|
|
||||||
import torch
|
import torch
|
||||||
|
|
||||||
|
from colossalai.device.device_mesh import DeviceMesh
|
||||||
|
|
||||||
|
|
||||||
def test_device_mesh():
|
def test_device_mesh():
|
||||||
physical_mesh_id = torch.arange(0, 16).reshape(2, 8)
|
physical_mesh_id = torch.arange(0, 16).reshape(2, 8)
|
||||||
|
Loading…
Reference in New Issue
Block a user