Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
Get rid of some divide-by-zero errors in time estimation
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushikcfd committed Sep 22, 2024
1 parent 285767f commit 7b2d30d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pyop2/transforms/auto_tiling.py
Original file line number Diff line number Diff line change
Expand Up @@ -1675,9 +1675,9 @@ def estimated_exec_time(self, tiling_config):
"""
T_e_r = tiling_config.operator_tile_descriptions[0][0]
(quad_tile_len,) = tiling_config.quad_rowtile_lengths
nwi = tiling_config.nthreads_per_cell
nwarps = self.get_effective_warps_per_sm(tiling_config)
nblocks = self.get_effective_blocks_per_sm(tiling_config)
if nwarps == 0:
return (np.inf, 0)
nsync = self.get_nsync(tiling_config)
effective_global_bw = 21 if nwarps > 8 else 20 * (nwarps / 8)
effective_shared_bw = (
Expand Down Expand Up @@ -1766,8 +1766,6 @@ def estimated_exec_time(self, tiling_config):
)
return (total_time, nsync)

return 4.0 / (nwarps) + nsync / nblocks + nwi / 8

def __call__(self) -> Tuple[ParametricTiling, ...]:
from itertools import product

Expand Down

0 comments on commit 7b2d30d

Please sign in to comment.