Skip to content
Open
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
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ abstract: >-
of edge training on a single GPU server.
type: software
license: Apache-2.0
repository-code: 'https://github.com/drunkcoding/DeviceEmulator'
repository-code: 'https://github.com/netsys-edinburgh/morphling'
authors:
- family-names: Xue
given-names: Leyang
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ contributions.
This project adopts the [Contributor Covenant Code of
Conduct](CODE_OF_CONDUCT.md). By participating you agree to abide by its
terms. Report unacceptable behavior privately via GitHub Security
Advisories: <https://github.com/drunkcoding/DeviceEmulator/security/advisories/new>.
Advisories: <https://github.com/netsys-edinburgh/morphling/security/advisories/new>.

Security vulnerabilities follow the same private channel. See
[SECURITY.md](SECURITY.md) for the reporting process and response
timeline.

## How to Contribute

1. Check the [issue tracker](https://github.com/drunkcoding/DeviceEmulator/issues)
1. Check the [issue tracker](https://github.com/netsys-edinburgh/morphling/issues)
for open issues, or open a new one to discuss your idea before writing code.
2. Follow the
[Fork-and-Pull-Request](https://docs.github.com/en/get-started/quickstart/contributing-to-projects)
Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
**Emulator for Distributed Machine Learning at the Edge**

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Format](https://github.com/drunkcoding/DeviceEmulator/actions/workflows/format.yaml/badge.svg)](https://github.com/drunkcoding/DeviceEmulator/actions/workflows/format.yaml)
[![Build](https://github.com/drunkcoding/DeviceEmulator/actions/workflows/build.yml/badge.svg)](https://github.com/drunkcoding/DeviceEmulator/actions/workflows/build.yml)
[![Format](https://github.com/netsys-edinburgh/morphling/actions/workflows/format.yaml/badge.svg)](https://github.com/netsys-edinburgh/morphling/actions/workflows/format.yaml)
[![Build](https://github.com/netsys-edinburgh/morphling/actions/workflows/build.yml/badge.svg)](https://github.com/netsys-edinburgh/morphling/actions/workflows/build.yml)
[![EdgeSys '26](https://img.shields.io/badge/EdgeSys-2026-blue)](https://doi.org/10.1145/3812836.3814779)

</div>
Expand All @@ -23,6 +23,12 @@ decouples memory demand from device count, and uses event-driven virtual time
to preserve execution semantics. The result is large-scale what-if studies of
edge training without a physical device fleet.

### Used by

- [Wasp](https://github.com/netsys-edinburgh/wasp) — coordinator-driven runtime
for exact synchronous edge foundation-model training, built on Morphling's
public integration surface (`morphling.api`).

## Paper

> **Morphling: Emulator for Distributed Machine Learning at the Edge**
Expand Down Expand Up @@ -100,7 +106,7 @@ docker run --rm --gpus all --ulimit memlock=-1 device-emulator:latest \

`--ulimit memlock=-1` is required: the proxy server's pinned-buffer pools
and the #55 4 MiB bandwidth probe exceed the default 8 MiB container
memlock budget. See [issue #59](https://github.com/drunkcoding/DeviceEmulator/issues/59)
memlock budget. See [issue #59](https://github.com/netsys-edinburgh/morphling/issues/59)
and [`docs/deployment.md`](docs/deployment.md#quick-start-with---measurement).

The image builds **all** C++ test categories (unit, CUDA/cuBLAS,
Expand Down
6 changes: 6 additions & 0 deletions docs/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ Services (MobiSys Workshop '26)**, Cambridge, United Kingdom, June 21–25, 2026
- ISBN: `979-8-4007-2712-2/26/06`
- License: CC BY 4.0

## Used by

- [Wasp](https://github.com/netsys-edinburgh/wasp) — coordinator-driven runtime
for exact synchronous edge foundation-model training, built on Morphling via
the public `morphling.api` surface.

## Authors

- Leyang Xue (The University of Edinburgh)
Expand Down
8 changes: 4 additions & 4 deletions docs/web/deployment.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<a class="tab" href="green-context.html">Internals</a>
<a class="tab" href="deployment.html" aria-current="page">Deployment</a>
<a class="tab" href="paper.html">Paper</a>
<a class="tab" href="https://github.com/drunkcoding/DeviceEmulator">GitHub ↗</a>
<a class="tab" href="https://github.com/netsys-edinburgh/morphling">GitHub ↗</a>
</div>
</nav>

Expand Down Expand Up @@ -211,8 +211,8 @@ <h2 id="notes">Notes &amp; environment</h2>
<code>docker-nginx/morphling_stream.conf</code> at the repo root.</li>
<li><code>SPDLOG_LEVEL</code> controls C++ backend verbosity:
<code>debug</code>, <code>info</code>, <code>warn</code>, <code>error</code>.</li>
<li>For multi-GPU or multi-host runs, see <a href="https://github.com/drunkcoding/DeviceEmulator/blob/main/docs/DOCKER.md">DOCKER.md</a>
and <a href="https://github.com/drunkcoding/DeviceEmulator/blob/main/docs/DEV_README.md">DEV_README.md</a>.</li>
<li>For multi-GPU or multi-host runs, see <a href="https://github.com/netsys-edinburgh/morphling/blob/main/docs/DOCKER.md">DOCKER.md</a>
and <a href="https://github.com/netsys-edinburgh/morphling/blob/main/docs/DEV_README.md">DEV_README.md</a>.</li>
</ul>


Expand Down Expand Up @@ -241,7 +241,7 @@ <h4>On this page</h4>
<footer class="docs-footer">
<div>© 2026 The Morphling Authors · Apache-2.0</div>
<div>
<a href="https://github.com/drunkcoding/DeviceEmulator">GitHub</a> ·
<a href="https://github.com/netsys-edinburgh/morphling">GitHub</a> ·
<a href="https://doi.org/10.1145/3812836.3814779">DOI</a> ·
<a href="troubleshooting.html">Troubleshooting</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions docs/web/green-context.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<a class="tab" href="green-context.html" aria-current="page">Internals</a>
<a class="tab" href="deployment.html">Deployment</a>
<a class="tab" href="paper.html">Paper</a>
<a class="tab" href="https://github.com/drunkcoding/DeviceEmulator">GitHub ↗</a>
<a class="tab" href="https://github.com/netsys-edinburgh/morphling">GitHub ↗</a>
</div>
</nav>

Expand Down Expand Up @@ -291,7 +291,7 @@ <h4>On this page</h4>
<footer class="docs-footer">
<div>© 2026 The Morphling Authors · Apache-2.0</div>
<div>
<a href="https://github.com/drunkcoding/DeviceEmulator">GitHub</a> ·
<a href="https://github.com/netsys-edinburgh/morphling">GitHub</a> ·
<a href="https://doi.org/10.1145/3812836.3814779">DOI</a> ·
<a href="troubleshooting.html">Troubleshooting</a>
</div>
Expand Down
12 changes: 6 additions & 6 deletions docs/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<a class="tab" href="green-context.html">Internals</a>
<a class="tab" href="deployment.html">Deployment</a>
<a class="tab" href="paper.html">Paper</a>
<a class="tab" href="https://github.com/drunkcoding/DeviceEmulator">GitHub ↗</a>
<a class="tab" href="https://github.com/netsys-edinburgh/morphling">GitHub ↗</a>
</div>
</nav>

Expand Down Expand Up @@ -139,7 +139,7 @@ <h1 class="rise rise-2">Welcome to Morphling.</h1>
</p>

<div class="gh-row rise rise-3">
<a class="card" href="https://github.com/drunkcoding/DeviceEmulator" style="padding:0.55rem 0.9rem; display:inline-flex; align-items:center; gap:0.5rem; font-size:0.85rem;">
<a class="card" href="https://github.com/netsys-edinburgh/morphling" style="padding:0.55rem 0.9rem; display:inline-flex; align-items:center; gap:0.5rem; font-size:0.85rem;">
<svg aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="currentColor"><path d="M12 .5C5.65.5.5 5.65.5 12c0 5.08 3.29 9.39 7.86 10.91.58.11.79-.25.79-.55v-2.13c-3.2.7-3.87-1.36-3.87-1.36-.52-1.33-1.28-1.69-1.28-1.69-1.04-.71.08-.7.08-.7 1.15.08 1.76 1.18 1.76 1.18 1.03 1.76 2.69 1.25 3.34.96.1-.74.4-1.25.73-1.54-2.55-.29-5.23-1.27-5.23-5.65 0-1.25.45-2.27 1.18-3.07-.12-.29-.51-1.46.11-3.04 0 0 .97-.31 3.18 1.17a11.1 11.1 0 0 1 5.79 0c2.21-1.48 3.18-1.17 3.18-1.17.62 1.58.23 2.75.11 3.04.73.8 1.18 1.82 1.18 3.07 0 4.39-2.69 5.36-5.25 5.64.41.35.78 1.04.78 2.1v3.11c0 .3.21.66.79.55C20.21 21.39 23.5 17.08 23.5 12 23.5 5.65 18.35.5 12 .5z"/></svg>
Star on GitHub
</a>
Expand Down Expand Up @@ -249,23 +249,23 @@ <h2 id="community">Learn more and join the project</h2>
<div class="row">
<svg aria-hidden="true" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M16 18l6-6-6-6"/><path d="M8 6l-6 6 6 6"/></svg>
<div>
<a href="https://github.com/drunkcoding/DeviceEmulator">Source on GitHub</a>
<a href="https://github.com/netsys-edinburgh/morphling">Source on GitHub</a>
<span class="desc"> — full repository, CI, and release tags.</span>
</div>
</div>

<div class="row">
<svg aria-hidden="true" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>
<div>
<a href="https://github.com/drunkcoding/DeviceEmulator/issues">Issue tracker</a>
<a href="https://github.com/netsys-edinburgh/morphling/issues">Issue tracker</a>
<span class="desc"> — bug reports, feature requests, and the roadmap.</span>
</div>
</div>

<div class="row">
<svg aria-hidden="true" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"/></svg>
<div>
<a href="https://github.com/drunkcoding/DeviceEmulator/blob/main/CONTRIBUTING.md">CONTRIBUTING.md</a>
<a href="https://github.com/netsys-edinburgh/morphling/blob/main/CONTRIBUTING.md">CONTRIBUTING.md</a>
<span class="desc"> — merge policy, pre-commit setup, Docker-only test policy.</span>
</div>
</div>
Expand Down Expand Up @@ -322,7 +322,7 @@ <h4>On this page</h4>
<footer class="docs-footer">
<div>© 2026 The Morphling Authors · Apache-2.0</div>
<div>
<a href="https://github.com/drunkcoding/DeviceEmulator">GitHub</a> ·
<a href="https://github.com/netsys-edinburgh/morphling">GitHub</a> ·
<a href="https://doi.org/10.1145/3812836.3814779">DOI</a> ·
<a href="troubleshooting.html">Troubleshooting</a>
</div>
Expand Down
6 changes: 3 additions & 3 deletions docs/web/install.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<a class="tab" href="green-context.html">Internals</a>
<a class="tab" href="deployment.html">Deployment</a>
<a class="tab" href="paper.html">Paper</a>
<a class="tab" href="https://github.com/drunkcoding/DeviceEmulator">GitHub ↗</a>
<a class="tab" href="https://github.com/netsys-edinburgh/morphling">GitHub ↗</a>
</div>
</nav>

Expand Down Expand Up @@ -177,7 +177,7 @@ <h2 id="verify">Verify the install</h2>

<p>The image builds <strong>all</strong> C++ test categories at image-build
time (unit, CUDA/cuBLAS, XtGemm/worker, zerocopy, benchmarks). See the
<a href="https://github.com/drunkcoding/DeviceEmulator/blob/main/tests/cpp/README.md">C++ test catalogue</a>
<a href="https://github.com/netsys-edinburgh/morphling/blob/main/tests/cpp/README.md">C++ test catalogue</a>
for the full list.</p>

<h2 id="native">Native (non-Docker) development</h2>
Expand Down Expand Up @@ -213,7 +213,7 @@ <h4>On this page</h4>
<footer class="docs-footer">
<div>© 2026 The Morphling Authors · Apache-2.0</div>
<div>
<a href="https://github.com/drunkcoding/DeviceEmulator">GitHub</a> ·
<a href="https://github.com/netsys-edinburgh/morphling">GitHub</a> ·
<a href="https://doi.org/10.1145/3812836.3814779">DOI</a> ·
<a href="troubleshooting.html">Troubleshooting</a>
</div>
Expand Down
6 changes: 3 additions & 3 deletions docs/web/paper.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<a class="tab" href="green-context.html">Internals</a>
<a class="tab" href="deployment.html">Deployment</a>
<a class="tab" href="paper.html" aria-current="page">Paper</a>
<a class="tab" href="https://github.com/drunkcoding/DeviceEmulator">GitHub ↗</a>
<a class="tab" href="https://github.com/netsys-edinburgh/morphling">GitHub ↗</a>
</div>
</nav>

Expand Down Expand Up @@ -222,7 +222,7 @@ <h2 id="bibtex">BibTeX</h2>
}</code></pre>

<p>The same metadata in CFF (machine-readable) form is at
<a href="https://github.com/drunkcoding/DeviceEmulator/blob/main/CITATION.cff">CITATION.cff</a>.</p>
<a href="https://github.com/netsys-edinburgh/morphling/blob/main/CITATION.cff">CITATION.cff</a>.</p>


<div class="page-nav">
Expand All @@ -249,7 +249,7 @@ <h4>On this page</h4>
<footer class="docs-footer">
<div>© 2026 The Morphling Authors · Apache-2.0</div>
<div>
<a href="https://github.com/drunkcoding/DeviceEmulator">GitHub</a> ·
<a href="https://github.com/netsys-edinburgh/morphling">GitHub</a> ·
<a href="https://doi.org/10.1145/3812836.3814779">DOI</a> ·
<a href="troubleshooting.html">Troubleshooting</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions docs/web/quickstart.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<a class="tab" href="green-context.html">Internals</a>
<a class="tab" href="deployment.html">Deployment</a>
<a class="tab" href="paper.html">Paper</a>
<a class="tab" href="https://github.com/drunkcoding/DeviceEmulator">GitHub ↗</a>
<a class="tab" href="https://github.com/netsys-edinburgh/morphling">GitHub ↗</a>
</div>
</nav>

Expand Down Expand Up @@ -209,7 +209,7 @@ <h4>On this page</h4>
<footer class="docs-footer">
<div>© 2026 The Morphling Authors · Apache-2.0</div>
<div>
<a href="https://github.com/drunkcoding/DeviceEmulator">GitHub</a> ·
<a href="https://github.com/netsys-edinburgh/morphling">GitHub</a> ·
<a href="https://doi.org/10.1145/3812836.3814779">DOI</a> ·
<a href="troubleshooting.html">Troubleshooting</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions docs/web/troubleshooting.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<a class="tab" href="green-context.html">Internals</a>
<a class="tab" href="deployment.html">Deployment</a>
<a class="tab" href="paper.html">Paper</a>
<a class="tab" href="https://github.com/drunkcoding/DeviceEmulator">GitHub ↗</a>
<a class="tab" href="https://github.com/netsys-edinburgh/morphling">GitHub ↗</a>
</div>
</nav>

Expand Down Expand Up @@ -224,7 +224,7 @@ <h4>On this page</h4>
<footer class="docs-footer">
<div>© 2026 The Morphling Authors · Apache-2.0</div>
<div>
<a href="https://github.com/drunkcoding/DeviceEmulator">GitHub</a> ·
<a href="https://github.com/netsys-edinburgh/morphling">GitHub</a> ·
<a href="https://doi.org/10.1145/3812836.3814779">DOI</a> ·
<a href="troubleshooting.html">Troubleshooting</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions docs/web/worker-pool.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<a class="tab" href="green-context.html" aria-current="page">Internals</a>
<a class="tab" href="deployment.html">Deployment</a>
<a class="tab" href="paper.html">Paper</a>
<a class="tab" href="https://github.com/drunkcoding/DeviceEmulator">GitHub ↗</a>
<a class="tab" href="https://github.com/netsys-edinburgh/morphling">GitHub ↗</a>
</div>
</nav>

Expand Down Expand Up @@ -256,7 +256,7 @@ <h4>On this page</h4>
<footer class="docs-footer">
<div>© 2026 The Morphling Authors · Apache-2.0</div>
<div>
<a href="https://github.com/drunkcoding/DeviceEmulator">GitHub</a> ·
<a href="https://github.com/netsys-edinburgh/morphling">GitHub</a> ·
<a href="https://doi.org/10.1145/3812836.3814779">DOI</a> ·
<a href="troubleshooting.html">Troubleshooting</a>
</div>
Expand Down
39 changes: 39 additions & 0 deletions morphling/api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
"""morphling.api — supported public integration surface.

Stable, versioned entry points for downstream systems (for example Wasp,
https://github.com/netsys-edinburgh/wasp) that build on Morphling's backend,
autograd hooks, coordinator telemetry, and green-context runtime. Import from
this module instead of reaching into submodules directly; only these symbols
carry a stability guarantee across minor releases.
"""

from morphling import set_backend
from morphling.backend import AutoBackend
from morphling.entrypoint import DeviceConfigArguments, ModelConfigArguments
from morphling.hooks import apply_hooks
from morphling.hooks.autograd import LinearFunction
from morphling.runtime import GreenContextRuntime
from morphling.runtime.coordinator_metrics import (
CoordinatorMetricsCollector,
PhaseRecorder,
add_metrics_arguments,
metrics_config_from_args,
start_metrics_collector,
track_phase,
)

__all__ = [
"set_backend",
"AutoBackend",
"apply_hooks",
"LinearFunction",
"DeviceConfigArguments",
"ModelConfigArguments",
"add_metrics_arguments",
"metrics_config_from_args",
"start_metrics_collector",
"CoordinatorMetricsCollector",
"PhaseRecorder",
"track_phase",
"GreenContextRuntime",
]
4 changes: 4 additions & 0 deletions morphling/runtime/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@
These components enable device and network emulation for distributed
inference workflows with optional green context (CUDA) support.
"""

from morphling._GreenCtx import GreenContextRuntime

__all__ = [*globals().get("__all__", []), "GreenContextRuntime"]
Loading