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
39 changes: 29 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# TopoQueue

[![CI](https://github.com/Rionlyu/topoqueue/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/Rionlyu/topoqueue/actions/workflows/ci.yml)

TopoQueue is a deterministic Go CLI for exploring how queue policy and
topology constraints affect accelerator-job admission.

Expand All @@ -17,13 +19,30 @@ topology constraints affect accelerator-job admission.
- Concurrent comparison of policies with isolated mutable scheduling state.
- Strict YAML decoding that rejects unknown fields.

## Module path
## Installation

The Go module path is `github.com/Rionlyu/topoqueue`.
TopoQueue requires Go 1.25 or newer.

## Quick start
Install with Go:

TopoQueue requires Go 1.25 or newer.
```sh
go install github.com/Rionlyu/topoqueue/cmd/topoqueue@latest
topoqueue --help
```

`go install` writes the binary to `GOBIN`, or to `$(go env GOPATH)/bin` when
`GOBIN` is unset. Ensure that directory is on `PATH`.

To build from a repository checkout instead:

```sh
git clone https://github.com/Rionlyu/topoqueue.git
cd topoqueue
make build
./bin/topoqueue --help
```

## Quick start

Build the CLI and run the included comparison:

Expand Down Expand Up @@ -113,12 +132,12 @@ Policy comparison performs two independent runs with the same per-run bounds.
## Development

```sh
make fmt-check # verify gofmt output
make vet # run go vet ./...
make test # run tests with the race detector
make build # build bin/topoqueue
make demo # run the checked-in comparison
make benchmark # run the deterministic scheduler benchmark
make fmt-check
make vet
make test
make build
make demo
make benchmark
```

## Project structure
Expand Down
3 changes: 1 addition & 2 deletions internal/model/model.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// Package model defines TopoQueue's input data model.
package model

// Resources is a CPU and GPU quantity. Both values are whole, non-negative
// units in valid input.
// Resources holds CPU and GPU quantities.
type Resources struct {
CPU int64 `yaml:"cpu" json:"cpu"`
GPU int64 `yaml:"gpu" json:"gpu"`
Expand Down
2 changes: 1 addition & 1 deletion internal/model/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func ValidateJobs(jobSet JobSet) error {
}

// ValidateTopologyRequirements verifies that every node has every topology key
// required by the jobs. It should be called after loading both input files.
// required by the jobs.
func ValidateTopologyRequirements(cluster Cluster, jobSet JobSet) error {
requiredBy := make(map[string][]string)
for _, job := range jobSet.Jobs {
Expand Down