add debug mode for create_xx_functions for detail time cost analysis

This commit is contained in:
wls2002
2023-05-08 15:42:25 +08:00
parent d4a75b9394
commit e201d03157
8 changed files with 70 additions and 38 deletions

View File

@@ -105,7 +105,7 @@ class SpeciesController:
# the representatives of new species
sid, rid = list(zip(*[(k, v) for k, v in new_representatives.items()]))
distances = [
o2o_distance(pop_nodes[i], pop_connections[i], pop_nodes[r], pop_connections[r])
jax.device_get(o2o_distance(pop_nodes[i], pop_connections[i], pop_nodes[r], pop_connections[r]))
for r in rid
]
distances = np.array(distances)