Skip to content

Commit

Permalink
fix(decoder): only use available cores
Browse files Browse the repository at this point in the history
  • Loading branch information
dacorvo committed Jan 31, 2024
1 parent 4531aa2 commit dceed18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion optimum/neuron/modeling_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def get_export_config(
sequence_length = config.max_position_embeddings
if num_cores is None:
# Use all available cores
num_cores = len(os.listdir("/sys/class/neuron_device/")) * 2
num_cores = get_available_cores()
if auto_cast_type is None:
auto_cast_type = "fp32"
if config.torch_dtype == "float16":
Expand Down

0 comments on commit dceed18

Please sign in to comment.