use cubek_test_utils::{HostData, Progress};
use crate::{
InterpolateStrategy,
definition::InterpolateProblem,
eval::cpu_reference::{cpu_reference_result, kernel_result},
};
pub struct InterpolateCorrectness;
impl cubek_test_utils::Correctness for InterpolateCorrectness {
type Problem = InterpolateProblem;
type Strategy = InterpolateStrategy;
fn kernel_result(
&self,
strategy: &InterpolateStrategy,
problem: &InterpolateProblem,
seeds: &[u64],
) -> Result<HostData, String> {
let device = cubecl::test_device();
let client = device.client();
kernel_result(client, problem.clone(), *strategy, seeds[0])
}
fn reference_result(
&self,
problem: &InterpolateProblem,
seeds: &[u64],
progress: Option<&Progress>,
) -> Result<HostData, String> {
let device = cubecl::test_device();
let client = device.client();
cpu_reference_result(client, problem.clone(), seeds[0], progress)
}
}