(self)
| 64 | decimal=5) |
| 65 | |
| 66 | def test_dist_opt_fp16(self): |
| 67 | # Test the C++ all reduce operation in fp16 |
| 68 | |
| 69 | param.set_value(10) |
| 70 | grad.set_value(1) |
| 71 | |
| 72 | sgd.all_reduce_half(grad.data) |
| 73 | sgd.wait() |
| 74 | sgd.update(param, grad) |
| 75 | |
| 76 | np.testing.assert_array_almost_equal(tensor.to_numpy(param), |
| 77 | expected, |
| 78 | decimal=5) |
| 79 | |
| 80 | def test_dist_opt_fp16_fused(self): |
| 81 | # Test the C++ all reduce operation in fp16 |
nothing calls this directly
no test coverage detected