Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions crates/graphforge-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ pub struct GraphForge {
write_options: GraphForgeOptions,
/// Normalized execution resource policy applied to runtime and sessions (#337).
resource_policy: resource_policy::NormalizedResourcePolicy,
/// Instance-owned private CPU pool for parallel algorithm kernels (#337 / #342).
/// Instance-owned private CPU pool for parallel algorithm kernels (#337 / #342 / #343).
compute_pool: graphforge_exec::SharedComputePool,
/// Instance-owned heavy-query admission gate (#337).
heavy_query_admission: Arc<resource_policy::HeavyQueryAdmission>,
Expand Down Expand Up @@ -2329,15 +2329,17 @@ impl GraphForge {
.read()
.expect("adjacency visibility lock poisoned");
self.adjacency_provider.revalidate();
let batch = graphforge_exec::rank_algorithm_with_limits(
let batch = graphforge_exec::rank_algorithm_with_compute(
self.adjacency_provider.as_ref(),
&self.dir,
self.ontology_mode,
label_id,
std::slice::from_ref(&stem),
&dispatch_options,
graphforge_exec::AlgorithmLimits::default()
.with_batch_size(self.resource_policy.batch_size),
.with_batch_size(self.resource_policy.batch_size)
.with_compute_threads(self.resource_policy.compute_threads),
Some(self.compute_pool.clone()),
)?;
self.write_algorithm_property(
label,
Expand Down
9 changes: 5 additions & 4 deletions crates/graphforge-api/src/resource_policy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//! batch size, memory, spill, I/O concurrency, and heavy-query admission
//! before a [`crate::GraphForge`] instance begins work. `compute_threads`
//! sizes the instance-owned private CPU pool consumed by parallel cosine KNN
//! (#342) and future deterministic CPU kernels.
//! (#342), parallel PageRank (#343), and sibling deterministic CPU kernels.

use std::path::{Component, Path, PathBuf};
use std::sync::Arc;
Expand Down Expand Up @@ -54,9 +54,10 @@ pub struct ExecutionResourcePolicy {
pub io_concurrency: Option<usize>,
/// Maximum concurrent heavy Cypher / analyst invocations. `None` → 64.
pub max_concurrent_heavy_queries: Option<usize>,
/// Compute-thread budget for the instance-owned private CPU pool (#337 / #342).
/// Compute-thread budget for the instance-owned private CPU pool (#337 / #342 / #343).
///
/// Parallel cosine KNN partitions work by canonical source through that pool
/// Parallel cosine KNN partitions work by canonical source, and parallel
/// PageRank partitions destination-owned updates, through that pool
/// when work exceeds the documented crossover; `1` keeps the serial path.
pub compute_threads: Option<usize>,
}
Expand Down Expand Up @@ -101,7 +102,7 @@ pub struct NormalizedResourcePolicy {
pub io_concurrency: usize,
/// Heavy-query admission slots.
pub max_concurrent_heavy_queries: usize,
/// Compute-thread budget for the instance-owned private CPU pool (#342).
/// Compute-thread budget for the instance-owned private CPU pool (#342 / #343).
pub compute_threads: usize,
/// Machine logical parallelism observed at normalize time.
pub observed_logical_cpus: usize,
Expand Down
Loading