()
| 57 | |
| 58 | |
| 59 | def test_drop_basic(): |
| 60 | set_option("enable_drop", True) |
| 61 | # test xpu compute |
| 62 | x = mge.tensor(np.ones((3, 3)), dtype=np.float32) |
| 63 | y = mge.tensor(np.ones((3, 3)), dtype=np.float32) |
| 64 | z = x + y |
| 65 | z._drop() |
| 66 | z.numpy() |
| 67 | # test host value compute |
| 68 | x = mge.tensor(np.ones((2, 2)), dtype=np.float32) |
| 69 | y = mge.tensor(np.ones((2, 2)), dtype=np.float32) |
| 70 | z = x + y |
| 71 | z._drop() |
| 72 | z.numpy() |
| 73 | set_option("enable_drop", False) |
| 74 | |
| 75 | |
| 76 | def test_finalize(): |
nothing calls this directly
no test coverage detected