mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-04 10:34:41 +00:00
[misc] update pre-commit and run all files (#4752)
* [misc] update pre-commit * [misc] run pre-commit * [misc] remove useless configuration files * [misc] ignore cuda for clang-format
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
from dataclasses import dataclass
|
||||
from enum import Enum
|
||||
|
||||
__all__ = ['SolverOptions', 'SolverPerference', 'DataloaderOption', 'ShardOption']
|
||||
__all__ = ["SolverOptions", "SolverPerference", "DataloaderOption", "ShardOption"]
|
||||
|
||||
|
||||
class SolverPerference(Enum):
|
||||
"""
|
||||
This enum class is to define the solver preference.
|
||||
"""
|
||||
|
||||
STANDARD = 0
|
||||
DP = 1
|
||||
TP = 2
|
||||
@@ -25,6 +26,7 @@ class ShardOption(Enum):
|
||||
TP_SHARD: We require the node to be shard using tensor parallel strategies on last device mesh axis.
|
||||
TP_FULL_SHARD: We require the node to be shard using tensor parallel strategies on all device mesh axes.
|
||||
"""
|
||||
|
||||
STANDARD = 0
|
||||
SHARD = 1
|
||||
SHARD_LAST_AXIS = 2
|
||||
@@ -35,6 +37,7 @@ class DataloaderOption(Enum):
|
||||
"""
|
||||
This enum class is to define the dataloader option.
|
||||
"""
|
||||
|
||||
REPLICATED = 0
|
||||
DISTRIBUTED = 1
|
||||
|
||||
@@ -44,6 +47,7 @@ class SolverOptions:
|
||||
"""
|
||||
SolverOptions is a dataclass used to configure the preferences for the parallel execution plan search.
|
||||
"""
|
||||
|
||||
solver_perference: SolverPerference = SolverPerference.STANDARD
|
||||
dataloader_option: DataloaderOption = DataloaderOption.REPLICATED
|
||||
shard_option: ShardOption = ShardOption.STANDARD
|
||||
|
Reference in New Issue
Block a user