a8eeb46f0f10ae97c82c09003b2319529b7ce4d3,nn_dataflow/tests/unit_test/test_partition_scheme.py,TestPartitionScheme,test_part_neighbor_dist,#TestPartitionScheme#,160
Before Change
def test_part_neighbor_dist(self):
""" Get part_neighbor_dist. """
for ps in [self.ps1, self.ps2]:
self.assertTupleEqual(ps.part_neighbor_dist(ps.order[-1]),
(1, 1))
self.assertTupleEqual(ps.part_neighbor_dist(ps.order[-2]),
ps.dim(ps.order[-1]))
self.assertTupleEqual(ps.part_neighbor_dist(ps.order[-3]),
ps.dim(*ps.order[-2:]))
self.assertTupleEqual(ps.part_neighbor_dist(ps.order[-4]),
ps.dim(*ps.order[-3:]))
def test_part_neighbor_dist_inv(self):
""" Get part_neighbor_dist invalid arg. """
dist = self.ps1.part_neighbor_dist(pe.NUM)
self.assertTrue(all(math.isnan(d) for d in dist))
After Change
nbr_dist = ps.part_neighbor_dist(nr, ps.order[idx])
dim_below = ps.dim(*ps.order[idx + 1:]) if idx + 1 < pe.NUM \
else PhyDim2(1, 1)
dim_cur = ps.dim(ps.order[idx])
if dim_cur.h == 1:
self.assertTrue(math.isinf(nbr_dist.h))
else:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: stanford-mast/nn_dataflow
Commit Name: a8eeb46f0f10ae97c82c09003b2319529b7ce4d3
Time: 2017-08-21
Author: mgao12@stanford.edu
File Name: nn_dataflow/tests/unit_test/test_partition_scheme.py
Class Name: TestPartitionScheme
Method Name: test_part_neighbor_dist
Project Name: masa-su/pixyz
Commit Name: e182ecc224f844b63634d9a93b4b40bb3d78bef3
Time: 2018-11-10
Author: masa@weblab.t.u-tokyo.ac.jp
File Name: pixyz/distributions/distributions.py
Class Name:
Method Name: sum_samples
Project Name: stanford-mast/nn_dataflow
Commit Name: 999fd2807c746ab0c203f1ec20adcdd14be7da89
Time: 2017-07-13
Author: mgao12@stanford.edu
File Name: nn_dataflow/Partition.py
Class Name:
Method Name: get_ofmap_layout