(self)
| 78 | decimal=5) |
| 79 | |
| 80 | def test_dist_opt_fp16_fused(self): |
| 81 | # Test the C++ all reduce operation in fp16 |
| 82 | |
| 83 | param.set_value(10) |
| 84 | grad.set_value(1) |
| 85 | |
| 86 | sgd.fused_all_reduce_half([grad.data], send=False) |
| 87 | sgd.fused_all_reduce_half([grad.data]) |
| 88 | sgd.wait() |
| 89 | sgd.update(param, grad) |
| 90 | |
| 91 | np.testing.assert_array_almost_equal(tensor.to_numpy(param), |
| 92 | expected, |
| 93 | decimal=5) |
| 94 | |
| 95 | def test_dist_opt_spars_value(self): |
| 96 | # Test the C++ value based sparsification operation for all reduce |
nothing calls this directly
no test coverage detected