#![cfg(feature = "rlx")]
mod ocr_backend_common;
use rlx_runtime::Device;
#[test]
fn ocr_detection_runs_on_cpu() {
ocr_backend_common::run_detection_forward_if_available(Device::Cpu);
}
#[test]
fn ocr_recognition_runs_on_cpu() {
ocr_backend_common::run_recognition_logits_if_available(Device::Cpu);
}
#[test]
fn ocr_pipeline_runs_on_cpu() {
ocr_backend_common::run_engine_get_text_if_available(Device::Cpu);
}
#[cfg(all(target_os = "macos", feature = "metal"))]
#[test]
fn ocr_detection_runs_on_metal() {
ocr_backend_common::run_detection_forward_if_available(Device::Metal);
}
#[cfg(all(target_os = "macos", feature = "metal"))]
#[test]
fn ocr_recognition_runs_on_metal() {
ocr_backend_common::run_recognition_logits_if_available(Device::Metal);
}
#[cfg(all(target_os = "macos", feature = "metal"))]
#[test]
fn ocr_pipeline_runs_on_metal() {
ocr_backend_common::run_engine_get_text_if_available(Device::Metal);
}
#[cfg(all(target_os = "macos", feature = "mlx"))]
#[test]
fn ocr_detection_runs_on_mlx() {
ocr_backend_common::run_detection_forward_if_available(Device::Mlx);
}
#[cfg(all(target_os = "macos", feature = "mlx"))]
#[test]
fn ocr_recognition_runs_on_mlx() {
ocr_backend_common::run_recognition_logits_if_available(Device::Mlx);
}
#[cfg(all(target_os = "macos", feature = "mlx"))]
#[test]
fn ocr_pipeline_runs_on_mlx() {
ocr_backend_common::run_engine_get_text_if_available(Device::Mlx);
}
#[cfg(feature = "cuda")]
#[test]
fn ocr_detection_runs_on_cuda() {
ocr_backend_common::run_detection_forward_if_available(Device::Cuda);
}
#[cfg(feature = "cuda")]
#[test]
fn ocr_recognition_runs_on_cuda() {
ocr_backend_common::run_recognition_logits_if_available(Device::Cuda);
}
#[cfg(feature = "cuda")]
#[test]
fn ocr_pipeline_runs_on_cuda() {
ocr_backend_common::run_engine_get_text_if_available(Device::Cuda);
}
#[cfg(feature = "rocm")]
#[test]
fn ocr_detection_runs_on_rocm() {
ocr_backend_common::run_detection_forward_if_available(Device::Rocm);
}
#[cfg(feature = "rocm")]
#[test]
fn ocr_recognition_runs_on_rocm() {
ocr_backend_common::run_recognition_logits_if_available(Device::Rocm);
}
#[cfg(feature = "rocm")]
#[test]
fn ocr_pipeline_runs_on_rocm() {
ocr_backend_common::run_engine_get_text_if_available(Device::Rocm);
}
#[cfg(feature = "gpu")]
#[test]
fn ocr_detection_runs_on_wgpu() {
ocr_backend_common::run_detection_forward_if_available(Device::Gpu);
}
#[cfg(feature = "gpu")]
#[test]
fn ocr_recognition_runs_on_wgpu() {
ocr_backend_common::run_recognition_logits_if_available(Device::Gpu);
}
#[cfg(feature = "gpu")]
#[test]
fn ocr_pipeline_runs_on_wgpu() {
ocr_backend_common::run_engine_get_text_if_available(Device::Gpu);
}
#[cfg(feature = "vulkan")]
#[test]
fn ocr_detection_runs_on_vulkan() {
ocr_backend_common::run_detection_forward_if_available(Device::Vulkan);
}
#[cfg(feature = "vulkan")]
#[test]
fn ocr_recognition_runs_on_vulkan() {
ocr_backend_common::run_recognition_logits_if_available(Device::Vulkan);
}
#[cfg(feature = "vulkan")]
#[test]
fn ocr_pipeline_runs_on_vulkan() {
ocr_backend_common::run_engine_get_text_if_available(Device::Vulkan);
}