File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 44# This source code is licensed under the BSD-style license found in the
55# LICENSE file in the root directory of this source tree.
66
7+ import math
78import uuid
89from logging import getLogger
910from typing import List , Tuple , TYPE_CHECKING
1011
11- import numpy as np
12-
1312import torch
1413
1514from torchstore .constants import MONARCH_HOSTMESH_V1
@@ -119,8 +118,8 @@ def get_target_tensor_shape_and_offset(
119118
120119 # Verify that local tensors can fill the target tensor, this verification is only necessary but not
121120 # sufficient to guarantee that the target tensor can be filled by local tensors.
122- local_tensor_total_size = sum ([np .prod (shape ) for shape in local_tensor_shapes ])
123- target_tensor_size = np .prod (target_shape )
121+ local_tensor_total_size = sum ([math .prod (shape ) for shape in local_tensor_shapes ])
122+ target_tensor_size = math .prod (target_shape )
124123 assert (
125124 local_tensor_total_size >= target_tensor_size
126125 ), "Local tensor sizes doesn't match target tensor. "
You can’t perform that action at this time.
0 commit comments