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
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@

VRP-GPU is an experimental Rust library for capacitated vehicle routing (CVRP).
It parses Solomon-style instances, builds routes with a greedy nearest-neighbor
heuristic, and provides CPU 2-opt local search. An optional CUDA path evaluates
2-opt candidates and selects one improving move. The CPU implementation is the
correctness reference for GPU validation.
heuristic, and provides CPU 2-opt local search. The optional `gpu` feature uses
CUDA to evaluate 2-opt candidates and select one improving move; it is not a
complete GPU solver. The CPU implementation is the correctness reference.

> **Status:** experimental alpha. Public APIs may change before the first stable
> release. Check crates.io for published versions; a version in this repository
> is not evidence that it has been uploaded.
> **Published alpha:** [`vrp-gpu 0.1.0-alpha.1`](https://crates.io/crates/vrp-gpu/0.1.0-alpha.1).
> Public APIs may change before the first stable release. See the
> [API documentation](https://docs.rs/vrp-gpu/0.1.0-alpha.1/vrp_gpu/) for this
> published version.

## Workspace

Expand All @@ -28,22 +29,21 @@ the pinned nightly compiler.

## Using the library

Once `0.1.0-alpha.1` is published, use its explicit prerelease version:
To use the published alpha, specify its prerelease version:

```toml
[dependencies]
vrp-gpu = "0.1.0-alpha.1"
```

Until then, depend on a tested repository commit explicitly:
To try changes that have not been published, pin a tested repository commit:

```toml
[dependencies]
vrp-gpu = { git = "https://github.com/pedrozaz/vrp-gpu", rev = "<tested-commit>" }
```

Enable CUDA host orchestration with the opt-in `gpu` feature on either
dependency source:
Enable CUDA candidate evaluation with the opt-in `gpu` feature:

```toml
[dependencies]
Expand Down
21 changes: 10 additions & 11 deletions crates/vrp-gpu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ with a greedy nearest-neighbor heuristic, and improves routes on the CPU.
The GPU API computes candidate deltas or selects a single move; it does not run
a complete GPU search loop or mutate a route.

This is an experimental alpha. Check crates.io for available versions; a
version in the repository does not mean the package has been published.
The first published alpha is
[`0.1.0-alpha.1`](https://crates.io/crates/vrp-gpu/0.1.0-alpha.1).
The API may change before a stable release. See the
[documentation for that version](https://docs.rs/vrp-gpu/0.1.0-alpha.1/vrp_gpu/).

## Features

Expand All @@ -21,20 +23,18 @@ PTX is precompiled; consumers do not need cuda-oxide or a nightly Rust compiler.

## Installation

Before publication, use the Git repository and pin a tested revision for a
reproducible application build:
To use the published alpha, specify its prerelease version:

```toml
[dependencies]
vrp-gpu = { git = "https://github.com/pedrozaz/vrp-gpu", rev = "<tested-commit>" }
vrp-gpu = "0.1.0-alpha.1"
```

Once `0.1.0-alpha.1` is available on crates.io, opt in to that prerelease
explicitly:
For changes not yet published, pin a tested Git revision:

```toml
[dependencies]
vrp-gpu = "0.1.0-alpha.1"
vrp-gpu = { git = "https://github.com/pedrozaz/vrp-gpu", rev = "<tested-commit>" }
```

## Example
Expand Down Expand Up @@ -76,14 +76,13 @@ exhaustion only means this greedy construction failed. If instance data are
constructed or changed through public fields, call `SolomonInstance::validate`
before passing them to CPU routines.

To use the optional GPU API, enable the feature in the dependency:
To use the optional GPU API in the published alpha, enable the feature:

```toml
[dependencies]
vrp-gpu = { git = "https://github.com/pedrozaz/vrp-gpu", rev = "<tested-commit>", features = ["gpu"] }
vrp-gpu = { version = "0.1.0-alpha.1", features = ["gpu"] }
```

Replace `<tested-commit>` with the exact Git commit you validated.
`gpu::evaluate_two_opt_deltas` returns a row-major `n × n` matrix with computed
`f32` deltas for valid `i < j` and positive infinity elsewhere. Extreme finite
input distances can still yield non-finite arithmetic results.
Expand Down
Loading