Skip to main content

Module parallel_executor

Module parallel_executor 

Source
Expand description

Parallel executor implementation using Rayon for multi-threaded execution.

This module provides a parallel implementation of the TensorLogic executor that can execute independent operations concurrently using thread pools.

§Key Features

  • Level-by-level execution: Operations are grouped by execution level
  • Rayon thread pools: Configurable thread pool for parallel execution
  • Automatic dependency handling: Uses DependencyAnalysis for safe parallelization
  • Performance monitoring: Tracks parallel vs sequential execution times

§Example

use tensorlogic_scirs_backend::ParallelScirs2Exec;
use tensorlogic_infer::TlAutodiff;

let mut executor = ParallelScirs2Exec::new();
executor.set_num_threads(4); // Use 4 threads

let result = executor.forward(&graph)?;

Structs§

ParallelConfig
Configuration for parallel execution.
ParallelScirs2Exec
Parallel executor using Rayon for multi-threaded execution.
ParallelStats
Statistics about parallel execution.