Skip to content

Commit

Permalink
Make neuron_cc_optlevel None by default (#632)
Browse files Browse the repository at this point in the history
Make neuron_cc_optlevel None by default
  • Loading branch information
michaelbenayoun authored Jun 14, 2024
1 parent c21ed7a commit adaa634
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions optimum/neuron/training_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ class NeuronTrainingArgumentsMixin:
default=False,
metadata={"help": "Whether or not to disable sequence parallelism."},
)
neuron_cc_optlevel: int = field(
default=2,
neuron_cc_optlevel: Optional[int] = field(
default=None,
metadata={
"choices": [1, 2, 3],
"help": "Specify the level of optimization the Neuron compiler should perform.",
Expand Down Expand Up @@ -182,7 +182,8 @@ def __post_init__(self):
else:
os.environ["ACCELERATE_USE_AMP"] = "false"

set_neuron_cc_optlevel(self.neuron_cc_optlevel)
if self.neuron_cc_optlevel is not None:
set_neuron_cc_optlevel(self.neuron_cc_optlevel)

self._world_size_should_behave_as_dp_size = False

Expand Down

0 comments on commit adaa634

Please sign in to comment.