()
| 496 | |
| 497 | #[test] |
| 498 | fn go_with_reduce_spec() { |
| 499 | pyo3::prepare_freethreaded_python(); |
| 500 | Python::with_gil(|py| { |
| 501 | use crate::ir::kernel::ReduceOp; |
| 502 | use crate::python::py_kernel::PyReduceSpec; |
| 503 | |
| 504 | let reduce_spec = PyReduceSpec { |
| 505 | op: ReduceOp::Sum, |
| 506 | buffer: crate::buffer::inner::Buffer::from_f64_vec(vec![1.0, 2.0, 3.0]), |
| 507 | }; |
| 508 | let py_reduce = reduce_spec.into_pyobject(py).unwrap(); |
| 509 | |
| 510 | let runtime = PyRuntimeModule::new(); |
| 511 | let call_args = empty_args(py); |
| 512 | let task = runtime |
| 513 | .go(py, py_reduce.as_any(), &call_args, None, None) |
| 514 | .unwrap(); |
| 515 | assert!(task.inner.is_done()); |
| 516 | }); |
| 517 | } |
| 518 | |
| 519 | #[test] |
| 520 | fn chan_creates_channel() { |
nothing calls this directly
no test coverage detected