Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenglongjiepheonix committed Jul 22, 2024
1 parent 6ef2081 commit 2c561d3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions optimum/fx/parallelization/passes.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ def run(self, graph_module: GraphModule, ctx: ParallelExecutionCtx, config: Conf
# weights loading
if target.source in ctx.weight_map:
from safetensors import safe_open

with safe_open(ctx.weight_map[target.source], framework="pt", device="cpu") as fp:
tensor_slice = fp.get_slice(target.source)
source_index = [
Expand Down

0 comments on commit 2c561d3

Please sign in to comment.