use onnx_runtime_ep_api::{TensorMut, TensorView};
#[inline]
pub(crate) fn record_kernel_metrics(
inputs: &[TensorView<'_>],
outputs: &[TensorMut<'_>],
flops: impl FnOnce() -> u64,
) {
onnx_runtime_ep_api::record_kernel_metrics("cuda", inputs, outputs, flops);
}
#[allow(dead_code)]
#[inline]
pub(crate) fn worker_span(label: &'static str) -> Option<impl Drop> {
onnx_runtime_ep_api::kernel_worker_span(label)
}
pub(crate) fn product(values: impl IntoIterator<Item = usize>) -> u64 {
values
.into_iter()
.fold(1_u64, |total, value| total.saturating_mul(value as u64))
}