mplang-nightly 0.1.dev154__py3-none-any.whl → 0.1.dev156__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mplang/core/cluster.py +1 -1
- mplang/core/expr/evaluator.py +0 -1
- mplang/core/mptype.py +0 -34
- mplang/kernels/base.py +11 -35
- mplang/kernels/context.py +70 -17
- mplang/kernels/crypto.py +8 -7
- mplang/kernels/mock_tee.py +4 -3
- mplang/kernels/spu.py +14 -21
- mplang/kernels/stablehlo.py +8 -5
- mplang/runtime/data_providers.py +13 -19
- mplang/runtime/session.py +1 -2
- {mplang_nightly-0.1.dev154.dist-info → mplang_nightly-0.1.dev156.dist-info}/METADATA +1 -1
- {mplang_nightly-0.1.dev154.dist-info → mplang_nightly-0.1.dev156.dist-info}/RECORD +16 -16
- {mplang_nightly-0.1.dev154.dist-info → mplang_nightly-0.1.dev156.dist-info}/WHEEL +0 -0
- {mplang_nightly-0.1.dev154.dist-info → mplang_nightly-0.1.dev156.dist-info}/entry_points.txt +0 -0
- {mplang_nightly-0.1.dev154.dist-info → mplang_nightly-0.1.dev156.dist-info}/licenses/LICENSE +0 -0
mplang/core/cluster.py
CHANGED
@@ -255,7 +255,7 @@ class ClusterSpec:
|
|
255
255
|
Optional explicit endpoint list of length ``world_size``. Each element may
|
256
256
|
include scheme (``http://``) or not; stored verbatim. If not provided we
|
257
257
|
synthesize ``localhost:{5000 + i}`` (5000 is a fixed default; pass explicit
|
258
|
-
endpoints for control).
|
258
|
+
endpoints for control).
|
259
259
|
spu_protocol / spu_field:
|
260
260
|
SPU device config values.
|
261
261
|
runtime_version / runtime_platform:
|
mplang/core/expr/evaluator.py
CHANGED
@@ -66,7 +66,6 @@ class EvalSemantic:
|
|
66
66
|
"""Shared evaluation semantics and utilities for evaluators.
|
67
67
|
|
68
68
|
Minimal dataclass carrying runtime execution context (rank/env/comm/runtime).
|
69
|
-
Legacy handler-based execution (pfunc_handles) has been fully removed.
|
70
69
|
"""
|
71
70
|
|
72
71
|
rank: int
|
mplang/core/mptype.py
CHANGED
@@ -400,39 +400,5 @@ class MPType:
|
|
400
400
|
"Table object detection for non-pandas objects not fully implemented yet"
|
401
401
|
)
|
402
402
|
|
403
|
-
# Check if it's a table-like object (legacy check for backward compatibility)
|
404
|
-
if hasattr(obj, "dtypes") and hasattr(obj, "columns"):
|
405
|
-
# Basic pandas DataFrame support
|
406
|
-
try:
|
407
|
-
import pandas as pd
|
408
|
-
|
409
|
-
if isinstance(obj, pd.DataFrame):
|
410
|
-
from mplang.core.dtype import DType
|
411
|
-
|
412
|
-
schema_dict = {}
|
413
|
-
for col_name in obj.columns:
|
414
|
-
pandas_dtype = obj[col_name].dtype
|
415
|
-
# Convert pandas dtype to DType
|
416
|
-
if pandas_dtype.kind in (
|
417
|
-
"O",
|
418
|
-
"U",
|
419
|
-
"S",
|
420
|
-
): # object, unicode, string
|
421
|
-
schema_dict[col_name] = (
|
422
|
-
DType.from_numpy(pandas_dtype)
|
423
|
-
if pandas_dtype.kind != "O"
|
424
|
-
else STRING
|
425
|
-
)
|
426
|
-
else:
|
427
|
-
schema_dict[col_name] = DType.from_numpy(pandas_dtype)
|
428
|
-
schema = TableType.from_dict(schema_dict)
|
429
|
-
return cls(schema, pmask, attrs)
|
430
|
-
except ImportError:
|
431
|
-
pass
|
432
|
-
# For other table-like objects without pandas
|
433
|
-
raise NotImplementedError(
|
434
|
-
"Table object detection not fully implemented yet"
|
435
|
-
)
|
436
|
-
|
437
403
|
# Otherwise treat as tensor-like
|
438
404
|
return cls.from_tensor(obj, pmask, **attrs)
|
mplang/kernels/base.py
CHANGED
@@ -34,7 +34,10 @@ from __future__ import annotations
|
|
34
34
|
import contextvars
|
35
35
|
from collections.abc import Callable
|
36
36
|
from dataclasses import dataclass
|
37
|
-
from typing import Any
|
37
|
+
from typing import TYPE_CHECKING, Any
|
38
|
+
|
39
|
+
if TYPE_CHECKING:
|
40
|
+
from mplang.kernels.context import RuntimeContext
|
38
41
|
|
39
42
|
__all__ = [
|
40
43
|
"KernelContext",
|
@@ -48,12 +51,15 @@ __all__ = [
|
|
48
51
|
|
49
52
|
@dataclass
|
50
53
|
class KernelContext:
|
51
|
-
"""Ephemeral
|
54
|
+
"""Ephemeral per-kernel invocation context.
|
55
|
+
|
56
|
+
Cross-kernel persistent state (RNGs, compiled artifacts, environment handles)
|
57
|
+
should be stored in RuntimeContext.
|
58
|
+
"""
|
52
59
|
|
53
60
|
rank: int
|
54
61
|
world_size: int
|
55
|
-
|
56
|
-
cache: dict[str, Any] # runtime-level shared cache (per BackendRuntime)
|
62
|
+
runtime: RuntimeContext
|
57
63
|
|
58
64
|
|
59
65
|
_CTX_VAR: contextvars.ContextVar[KernelContext | None] = contextvars.ContextVar(
|
@@ -62,37 +68,7 @@ _CTX_VAR: contextvars.ContextVar[KernelContext | None] = contextvars.ContextVar(
|
|
62
68
|
|
63
69
|
|
64
70
|
def cur_kctx() -> KernelContext:
|
65
|
-
"""Return
|
66
|
-
|
67
|
-
Two storages:
|
68
|
-
- state: namespaced pockets (dict[str, dict]) for backend-local mutable helpers
|
69
|
-
- cache: global (per runtime) shared dict; prefer state unless truly cross-backend
|
70
|
-
|
71
|
-
Examples:
|
72
|
-
1) Compile cache::
|
73
|
-
@kernel_def("mlir.stablehlo")
|
74
|
-
def _exec(pfunc, args):
|
75
|
-
ctx = cur_kctx()
|
76
|
-
pocket = ctx.state.setdefault("stablehlo", {})
|
77
|
-
cache = pocket.setdefault("compile_cache", {})
|
78
|
-
text = pfunc.fn_text
|
79
|
-
mod = cache.get(text)
|
80
|
-
if mod is None:
|
81
|
-
mod = compile_mlir(text)
|
82
|
-
cache[text] = mod
|
83
|
-
return run(mod, args)
|
84
|
-
|
85
|
-
2) Deterministic RNG::
|
86
|
-
@kernel_def("crypto.keygen")
|
87
|
-
def _keygen(pfunc, args):
|
88
|
-
ctx = cur_kctx()
|
89
|
-
pocket = ctx.state.setdefault("crypto", {})
|
90
|
-
rng = pocket.get("rng")
|
91
|
-
if rng is None:
|
92
|
-
rng = np.random.default_rng(1234 + ctx.rank * 7919)
|
93
|
-
pocket["rng"] = rng
|
94
|
-
return (rng.integers(0, 256, size=(32,), dtype=np.uint8),)
|
95
|
-
"""
|
71
|
+
"""Return current kernel execution context (only valid inside kernel)."""
|
96
72
|
ctx = _CTX_VAR.get()
|
97
73
|
if ctx is None:
|
98
74
|
raise RuntimeError("cur_kctx() called outside backend kernel execution")
|
mplang/kernels/context.py
CHANGED
@@ -118,12 +118,21 @@ class RuntimeContext:
|
|
118
118
|
op_type -> kernel_id and form a *template* for dispatch. After
|
119
119
|
initialization, all (re)binding must go through ``bind_op`` /
|
120
120
|
``rebind_op`` on this context (scoped to THIS runtime only).
|
121
|
-
state
|
122
|
-
Mutable
|
123
|
-
|
121
|
+
state : dict, optional
|
122
|
+
Mutable per-runtime key/value storage for kernels. Flat key space;
|
123
|
+
callers SHOULD use dotted prefixes (e.g. "stablehlo.compile_cache").
|
124
|
+
Kernels own their *state* (functional correctness data, caches,
|
125
|
+
handles, compiled objects, RNGs, etc.). Runtime does not interpret
|
126
|
+
structure—values may themselves be dicts if a kernel wants its own
|
127
|
+
pocket. Created empty when omitted.
|
128
|
+
stats : dict, optional
|
129
|
+
Mutable statistics/telemetry owned by the runtime (usage counters,
|
130
|
+
timings, profiling aids). Kernels may increment counters but should
|
131
|
+
avoid storing functional state here. A default "op_calls" mapping is
|
132
|
+
ensured. Created empty when omitted.
|
124
133
|
"""
|
125
134
|
|
126
|
-
__slots__ = ("_ibindings", "
|
135
|
+
__slots__ = ("_ibindings", "rank", "state", "stats", "world_size")
|
127
136
|
|
128
137
|
def __init__(
|
129
138
|
self,
|
@@ -131,8 +140,7 @@ class RuntimeContext:
|
|
131
140
|
world_size: int,
|
132
141
|
initial_bindings: Mapping[str, str] | None = None,
|
133
142
|
*,
|
134
|
-
state: dict[str,
|
135
|
-
cache: dict[str, Any] | None = None,
|
143
|
+
state: dict[str, Any] | None = None,
|
136
144
|
stats: dict[str, Any] | None = None,
|
137
145
|
) -> None:
|
138
146
|
_ensure_impl_imported()
|
@@ -144,7 +152,6 @@ class RuntimeContext:
|
|
144
152
|
**(initial_bindings or {}),
|
145
153
|
}
|
146
154
|
self.state = state if state is not None else {}
|
147
|
-
self.cache = cache if cache is not None else {}
|
148
155
|
self.stats = stats if stats is not None else {}
|
149
156
|
self.stats.setdefault("op_calls", {})
|
150
157
|
|
@@ -168,19 +175,15 @@ class RuntimeContext:
|
|
168
175
|
if isinstance(ins_spec, TensorType):
|
169
176
|
_validate_tensor_arg(fn_type, idx, ins_spec, val)
|
170
177
|
continue
|
178
|
+
|
171
179
|
# install kernel context
|
172
|
-
kctx = KernelContext(
|
173
|
-
|
174
|
-
world_size=self.world_size,
|
175
|
-
state=self.state,
|
176
|
-
cache=self.cache,
|
177
|
-
)
|
178
|
-
token = base._CTX_VAR.set(kctx) # type: ignore[attr-defined]
|
180
|
+
kctx = KernelContext(rank=self.rank, world_size=self.world_size, runtime=self)
|
181
|
+
token = base._CTX_VAR.set(kctx)
|
179
182
|
try:
|
180
183
|
raw = fn(pfunc, *arg_list)
|
181
184
|
finally:
|
182
|
-
base._CTX_VAR.reset(token)
|
183
|
-
|
185
|
+
base._CTX_VAR.reset(token)
|
186
|
+
|
184
187
|
try:
|
185
188
|
op_calls = self.stats.setdefault("op_calls", {})
|
186
189
|
op_calls[fn_type] = op_calls.get(fn_type, 0) + 1
|
@@ -213,7 +216,57 @@ class RuntimeContext:
|
|
213
216
|
|
214
217
|
def reset(self) -> None:
|
215
218
|
self.state.clear()
|
216
|
-
|
219
|
+
|
220
|
+
# ---- runtime state API (flat key space) ----
|
221
|
+
# Keys are treated atomically; convention encourages dotted prefixes
|
222
|
+
# (e.g. 'stablehlo.compile_cache.hash', 'crypto.rng'). Implementation
|
223
|
+
# does NOT parse or create hierarchical dicts—any grouping is purely
|
224
|
+
# by string prefix. Values themselves MAY be dicts if callers want a
|
225
|
+
# manual pocket. This keeps semantics simple and predictable.
|
226
|
+
|
227
|
+
def ensure_state(self, key: str, factory: type | Any = dict) -> Any:
|
228
|
+
"""Return value for key; if absent create via factory and store.
|
229
|
+
|
230
|
+
Key is not parsed; dotted forms are allowed but treated as a single
|
231
|
+
map key. Use consistent prefixes for grouping (e.g. 'spu.config').
|
232
|
+
"""
|
233
|
+
if not key:
|
234
|
+
raise ValueError("empty state key")
|
235
|
+
val = self.state.get(key)
|
236
|
+
if val is None:
|
237
|
+
val = factory()
|
238
|
+
self.state[key] = val
|
239
|
+
return val
|
240
|
+
|
241
|
+
def get_state(self, key: str, default: Any | None = None) -> Any:
|
242
|
+
if not key:
|
243
|
+
raise ValueError("empty state key")
|
244
|
+
return self.state.get(key, default)
|
245
|
+
|
246
|
+
def set_state(self, key: str, value: Any) -> None:
|
247
|
+
if not key:
|
248
|
+
raise ValueError("empty state key")
|
249
|
+
self.state[key] = value
|
250
|
+
|
251
|
+
def del_state(self, key: str) -> None:
|
252
|
+
if not key:
|
253
|
+
raise ValueError("empty state key")
|
254
|
+
self.state.pop(key, None)
|
255
|
+
|
256
|
+
def list_state(self, prefix: str = "") -> dict[str, Any]:
|
257
|
+
"""Return mapping of key -> value; optional prefix filter.
|
258
|
+
|
259
|
+
Prefix match is string-based; if prefix is non-empty include keys
|
260
|
+
where key == prefix or key starts with prefix + '.'.
|
261
|
+
"""
|
262
|
+
if not prefix:
|
263
|
+
return dict(self.state)
|
264
|
+
pref = prefix if prefix.endswith(".") else prefix + "."
|
265
|
+
out: dict[str, Any] = {}
|
266
|
+
for k, v in self.state.items():
|
267
|
+
if k == prefix or k.startswith(pref):
|
268
|
+
out[k] = v
|
269
|
+
return out
|
217
270
|
|
218
271
|
# ---- explicit (re)binding API ----
|
219
272
|
def bind_op(self, op_type: str, kernel_id: str, *, force: bool = False) -> None:
|
mplang/kernels/crypto.py
CHANGED
@@ -29,16 +29,17 @@ __all__: list[str] = [] # flat kernels only
|
|
29
29
|
def _get_rng() -> np.random.Generator:
|
30
30
|
"""Get (and lazily create) per-rank RNG for crypto kernels.
|
31
31
|
|
32
|
-
|
32
|
+
Runtime state is untyped, so we narrow the type explicitly for mypy.
|
33
33
|
"""
|
34
34
|
kctx = cur_kctx()
|
35
|
-
|
36
|
-
|
37
|
-
if
|
35
|
+
rt = kctx.runtime
|
36
|
+
rng_obj = rt.get_state("crypto.rng")
|
37
|
+
if rng_obj is None:
|
38
38
|
seed = int(os.environ.get("MPLANG_CRYPTO_SEED", "0")) + kctx.rank * 7919
|
39
|
-
|
40
|
-
|
41
|
-
|
39
|
+
rng_obj = np.random.default_rng(seed)
|
40
|
+
rt.set_state("crypto.rng", rng_obj)
|
41
|
+
assert isinstance(rng_obj, np.random.Generator) # narrow
|
42
|
+
return rng_obj
|
42
43
|
|
43
44
|
|
44
45
|
def _keystream(key: bytes, nonce: bytes, length: int) -> bytes:
|
mplang/kernels/mock_tee.py
CHANGED
@@ -28,12 +28,13 @@ __all__: list[str] = []
|
|
28
28
|
|
29
29
|
def _rng() -> np.random.Generator:
|
30
30
|
kctx = cur_kctx()
|
31
|
-
|
32
|
-
r =
|
31
|
+
rt = kctx.runtime
|
32
|
+
r = rt.get_state("tee.rng")
|
33
33
|
if r is None:
|
34
34
|
seed = int(os.environ.get("MPLANG_TEE_SEED", "0")) + kctx.rank * 10007
|
35
35
|
r = np.random.default_rng(seed)
|
36
|
-
|
36
|
+
rt.set_state("tee.rng", r)
|
37
|
+
assert isinstance(r, np.random.Generator) # type narrowing for mypy
|
37
38
|
return r
|
38
39
|
|
39
40
|
|
mplang/kernels/spu.py
CHANGED
@@ -63,17 +63,10 @@ class SpuValue:
|
|
63
63
|
return f"SpuValue({self.shape},{self.dtype},{self.vtype})"
|
64
64
|
|
65
65
|
|
66
|
-
# SpuHandler removed (legacy handler API deprecated)
|
67
|
-
|
68
|
-
|
69
|
-
def _get_spu_pocket() -> dict[str, Any]:
|
70
|
-
return cur_kctx().state.setdefault("spu", {})
|
71
|
-
|
72
|
-
|
73
66
|
def _get_spu_config_and_world() -> tuple[libspu.RuntimeConfig, int]:
|
74
|
-
|
75
|
-
cfg =
|
76
|
-
world =
|
67
|
+
kctx = cur_kctx()
|
68
|
+
cfg = kctx.runtime.get_state("spu.config")
|
69
|
+
world = kctx.runtime.get_state("spu.world")
|
77
70
|
if cfg is None or world is None:
|
78
71
|
raise RuntimeError("SPU kernel state not initialized (config/world)")
|
79
72
|
return cfg, int(world)
|
@@ -87,12 +80,12 @@ def _register_spu_env(
|
|
87
80
|
Idempotent: if config/world already set, they must match; link is recorded per rank.
|
88
81
|
This replaces previous global fallback seeding logic.
|
89
82
|
"""
|
90
|
-
|
91
|
-
prev_cfg =
|
92
|
-
prev_world =
|
83
|
+
kctx = cur_kctx()
|
84
|
+
prev_cfg = kctx.runtime.get_state("spu.config")
|
85
|
+
prev_world = kctx.runtime.get_state("spu.world")
|
93
86
|
if prev_cfg is None:
|
94
|
-
|
95
|
-
|
87
|
+
kctx.runtime.set_state("spu.config", config)
|
88
|
+
kctx.runtime.set_state("spu.world", world_size)
|
96
89
|
else:
|
97
90
|
# libspu RuntimeConfig may not implement __eq__; compare serialized repr
|
98
91
|
same_cfg = (
|
@@ -105,7 +98,7 @@ def _register_spu_env(
|
|
105
98
|
raise RuntimeError("Conflicting SPU env registration")
|
106
99
|
# Store single link per runtime (one runtime per rank)
|
107
100
|
if link_ctx is not None:
|
108
|
-
|
101
|
+
kctx.runtime.set_state("spu.link", link_ctx)
|
109
102
|
|
110
103
|
|
111
104
|
@kernel_def("spu.seed_env")
|
@@ -200,16 +193,16 @@ def _spu_run_mlir(pfunc: PFunction, *args: Any) -> Any:
|
|
200
193
|
)
|
201
194
|
|
202
195
|
cfg, _ = _get_spu_config_and_world()
|
203
|
-
|
204
|
-
link_ctx
|
196
|
+
kctx = cur_kctx()
|
197
|
+
link_ctx = kctx.runtime.get_state("spu.link")
|
205
198
|
if link_ctx is None:
|
206
199
|
raise RuntimeError("Rank not participating in SPU; no link set via seed_env")
|
207
200
|
|
208
|
-
# Lazy runtime cache
|
209
|
-
spu_rt =
|
201
|
+
# Lazy runtime cache under key spu.runtime
|
202
|
+
spu_rt = kctx.runtime.get_state("spu.runtime")
|
210
203
|
if spu_rt is None:
|
211
204
|
spu_rt = spu_api.Runtime(link_ctx.get_lctx(), cfg)
|
212
|
-
|
205
|
+
kctx.runtime.set_state("spu.runtime", spu_rt)
|
213
206
|
|
214
207
|
# Validate that all inputs are SpuValue objects
|
215
208
|
for i, arg in enumerate(args):
|
mplang/kernels/stablehlo.py
CHANGED
@@ -36,11 +36,14 @@ def _stablehlo_exec(pfunc: PFunction, *args: Any) -> Any:
|
|
36
36
|
if isinstance(mlir_text, bytes):
|
37
37
|
mlir_text = mlir_text.decode("utf-8")
|
38
38
|
|
39
|
-
#
|
39
|
+
# Flat-key compile cache: stablehlo.compile_cache.<hash>
|
40
40
|
ctx = cur_kctx()
|
41
|
-
|
42
|
-
|
43
|
-
|
41
|
+
rt = ctx.runtime
|
42
|
+
import hashlib
|
43
|
+
|
44
|
+
h = hashlib.sha256(mlir_text.encode("utf-8")).hexdigest()[:16]
|
45
|
+
key = f"stablehlo.compile_cache.{h}"
|
46
|
+
compiled = rt.get_state(key)
|
44
47
|
if compiled is None:
|
45
48
|
backend = jax.default_backend()
|
46
49
|
client = xla_bridge.get_backend(backend)
|
@@ -49,7 +52,7 @@ def _stablehlo_exec(pfunc: PFunction, *args: Any) -> Any:
|
|
49
52
|
compiled = client.compile(mlir_text, compile_options)
|
50
53
|
except Exception as e: # pragma: no cover
|
51
54
|
raise RuntimeError(f"StableHLO compile failed: {e}") from e
|
52
|
-
|
55
|
+
rt.set_state(key, compiled)
|
53
56
|
|
54
57
|
# Handle JAX's unused parameter elimination via arg_keep_map
|
55
58
|
runtime_args = args
|
mplang/runtime/data_providers.py
CHANGED
@@ -173,38 +173,32 @@ class FileProvider(DataProvider):
|
|
173
173
|
np.save(path, np.asarray(value))
|
174
174
|
|
175
175
|
|
176
|
-
class _KeyedPocket:
|
177
|
-
"""Small helper to keep a dict in KernelContext.state under a namespaced key."""
|
178
|
-
|
179
|
-
def __init__(self, ns: str):
|
180
|
-
self.ns = ns
|
181
|
-
|
182
|
-
def get_map(self, ctx: KernelContext) -> dict[str, Any]:
|
183
|
-
pocket = ctx.state.setdefault("resource.providers", {})
|
184
|
-
store = pocket.get(self.ns)
|
185
|
-
if store is None:
|
186
|
-
store = {}
|
187
|
-
pocket[self.ns] = store
|
188
|
-
return store # type: ignore[return-value]
|
189
|
-
|
190
|
-
|
191
176
|
class MemProvider(DataProvider):
|
192
177
|
"""In-memory per-runtime KV provider (per rank, per session/runtime)."""
|
193
178
|
|
194
|
-
|
195
|
-
|
179
|
+
STATE_KEY = "resource.providers.mem"
|
180
|
+
|
181
|
+
@staticmethod
|
182
|
+
def _store(ctx: KernelContext) -> dict[str, Any]:
|
183
|
+
# Use ensure_state so creation is atomic & centralized; enforce dict.
|
184
|
+
store = ctx.runtime.ensure_state(MemProvider.STATE_KEY, dict)
|
185
|
+
if not isinstance(store, dict): # pragma: no cover - defensive
|
186
|
+
raise TypeError(
|
187
|
+
f"runtime state key '{MemProvider.STATE_KEY}' expected dict, got {type(store).__name__}"
|
188
|
+
)
|
189
|
+
return store # type: ignore[return-value]
|
196
190
|
|
197
191
|
def read(
|
198
192
|
self, uri: ResolvedURI, out_spec: TensorType | TableType, *, ctx: KernelContext
|
199
193
|
) -> Any:
|
200
|
-
store = self.
|
194
|
+
store = self._store(ctx)
|
201
195
|
key = uri.raw
|
202
196
|
if key not in store:
|
203
197
|
raise FileNotFoundError(f"mem resource not found: {key}")
|
204
198
|
return store[key]
|
205
199
|
|
206
200
|
def write(self, uri: ResolvedURI, value: Any, *, ctx: KernelContext) -> None:
|
207
|
-
store = self.
|
201
|
+
store = self._store(ctx)
|
208
202
|
store[uri.raw] = value
|
209
203
|
|
210
204
|
|
mplang/runtime/session.py
CHANGED
@@ -184,8 +184,7 @@ class Session:
|
|
184
184
|
return
|
185
185
|
|
186
186
|
link_ctx = None
|
187
|
-
#
|
188
|
-
# TODO: make configurable if future deployments require dynamic offset.
|
187
|
+
# TODO(jint): reuse same port for mplang and spu.
|
189
188
|
SPU_PORT_OFFSET = 100
|
190
189
|
|
191
190
|
if self.is_spu_party:
|
@@ -4,7 +4,7 @@ mplang/device.py,sha256=RmjnhzHxJkkNmtBKtYMEbpQYBZpuC43qlllkCOp-QD8,12548
|
|
4
4
|
mplang/analysis/__init__.py,sha256=CTHFvRsi-nFngojqjn08UaR3RY9i7CJ7T2UdR95kCrk,1056
|
5
5
|
mplang/analysis/diagram.py,sha256=ffwgD12gL1_KH1uJ_EYkjmIlDrfxYJJkWj-wHl09_Xk,19520
|
6
6
|
mplang/core/__init__.py,sha256=lWxlEKfRwX7FNDzgyKZ1fiDMaCiqkyg0j5mKlZD_v7g,2244
|
7
|
-
mplang/core/cluster.py,sha256=
|
7
|
+
mplang/core/cluster.py,sha256=uARPlcWL0ddrWyOZ7vcX6JYN7a72mqbz2XGI1rSfkjE,11625
|
8
8
|
mplang/core/comm.py,sha256=MByyu3etlQh_TkP1vKCFLIAPPuJOpl9Kjs6hOj6m4Yc,8843
|
9
9
|
mplang/core/context_mgr.py,sha256=R0QJAod-1nYduVoOknLfAsxZiy-RtmuQcp-07HABYZU,1541
|
10
10
|
mplang/core/dtype.py,sha256=0rZqFaFikFu9RxtdO36JLEgFL-E-lo3hH10whwkTVVY,10213
|
@@ -12,7 +12,7 @@ mplang/core/interp.py,sha256=JKjKJGWURU5rlHQ2yG5XNKWzN6hLZsmo--hZuveQgxI,5915
|
|
12
12
|
mplang/core/mask.py,sha256=14DFxaA446lGjN4dzTuQgm9Shcn34rYI87YJHg0YGNQ,10693
|
13
13
|
mplang/core/mpir.py,sha256=V6S9RqegaI0yojhLkHla5nGBi27ASoxlrEs1k4tGubM,37980
|
14
14
|
mplang/core/mpobject.py,sha256=0pHSd7SrAFTScCFcB9ziDztElYQn-oIZOKBx47B3QX0,3732
|
15
|
-
mplang/core/mptype.py,sha256=
|
15
|
+
mplang/core/mptype.py,sha256=7Cp2e58uUX-uqTp6QxuioOMJ8BzLBPXlWG5rRakv2uo,13773
|
16
16
|
mplang/core/pfunc.py,sha256=PAr8qRhVveWO5HOI0TgdsWjpi4PFi2iEyuTlr9UVKSY,5106
|
17
17
|
mplang/core/primitive.py,sha256=-IkGqdbwtbMkLEOOTghXfuFtFvxu5jFQBupm5nPV-RI,40569
|
18
18
|
mplang/core/table.py,sha256=BqTBZn7Tfwce4vzl3XYhaX5hVmKagVq9-YoERDta6d8,5892
|
@@ -20,22 +20,22 @@ mplang/core/tensor.py,sha256=86u6DogSZMoL0w5XjtTmQm2PhA_VjwybN1b6U4Zzphg,2361
|
|
20
20
|
mplang/core/tracer.py,sha256=dVMfUeCMmPz4o6tLXewGMW1Kpy5gpZORvr9w4MhwDtM,14288
|
21
21
|
mplang/core/expr/__init__.py,sha256=qwiSTUOcanFJLyK8HZ13_L1ZDrybqpPXIlTHAyeumE8,1988
|
22
22
|
mplang/core/expr/ast.py,sha256=KE46KTtlH9RA2V_EzWVKCKolsycgTmt7SotUrOc8Qxs,20923
|
23
|
-
mplang/core/expr/evaluator.py,sha256=
|
23
|
+
mplang/core/expr/evaluator.py,sha256=VrUUA_0BWTgdB178PgOEKPv91nuiqZui0lS-loEOEE4,21600
|
24
24
|
mplang/core/expr/printer.py,sha256=VblKGnO0OUfzH7EBkszwRNxQUB8QyyC7BlJWJEUv9so,9546
|
25
25
|
mplang/core/expr/transformer.py,sha256=TyL-8FjrVvDq_C9X7kAuKkiqt2XdZM-okjzVQj0A33s,4893
|
26
26
|
mplang/core/expr/utils.py,sha256=VDTJ_-CsdHtVy9wDaGa7XdFxQ7o5lYYaeqcgsAhkbNI,2625
|
27
27
|
mplang/core/expr/visitor.py,sha256=2Ge-I5N-wH8VVXy8d2WyNaEv8x6seiRx9peyH9S2BYU,2044
|
28
28
|
mplang/core/expr/walk.py,sha256=lXkGJEEuvKGDqQihbxXPxfz2RfR1Q1zYUlt11iooQW0,11889
|
29
29
|
mplang/kernels/__init__.py,sha256=2WE4cmW96Xkzyq2yRRYNww4kZ5o6u6NbPV0BxqZG698,581
|
30
|
-
mplang/kernels/base.py,sha256
|
30
|
+
mplang/kernels/base.py,sha256=-YV4Aj5fs6GT4ehS6Tyi8WQ-amxn5edHTFJRQzyjHXY,3826
|
31
31
|
mplang/kernels/builtin.py,sha256=nSuM79cn7M6M27A6Y8ycilXT_qAlB1ktkwkRX6dv_VQ,7052
|
32
|
-
mplang/kernels/context.py,sha256=
|
33
|
-
mplang/kernels/crypto.py,sha256=
|
34
|
-
mplang/kernels/mock_tee.py,sha256=
|
32
|
+
mplang/kernels/context.py,sha256=yJjQUyQmBBl6btLb7KlmA-Ejf4-cgK3KmtC-m0sBbb8,13594
|
33
|
+
mplang/kernels/crypto.py,sha256=s7R0yd4Fk5cI2Qd3LpLc-kmbVuk8fFsbKbfKi43R0aE,3892
|
34
|
+
mplang/kernels/mock_tee.py,sha256=173QSzPgkrLo0zn0jsx6nNmq1WvfUhIM67FM4Dn30aA,2297
|
35
35
|
mplang/kernels/phe.py,sha256=8-_1IFPOaGECGj9mbYja8XoqbMYnYqfpDNVyMJd8J1Y,65247
|
36
|
-
mplang/kernels/spu.py,sha256=
|
36
|
+
mplang/kernels/spu.py,sha256=LkM8tNzhwTa8lufNgClHfnI4LNu25cdWLQZdJsMDEO8,9301
|
37
37
|
mplang/kernels/sql_duckdb.py,sha256=UN1Ev6-MxF_-65zMExUsLScC9PlmEIEcN8YziIoX_rY,1724
|
38
|
-
mplang/kernels/stablehlo.py,sha256=
|
38
|
+
mplang/kernels/stablehlo.py,sha256=M25_1G332uFCUcIIjpcTMwIdSDW1TMjfhFWxbz5OBZ0,2966
|
39
39
|
mplang/ops/__init__.py,sha256=dpe7WWiYapOFzJeGoKFYBr5mnd6P5SdOyvdYaM2Nhm0,1408
|
40
40
|
mplang/ops/base.py,sha256=h67_SHWNZGUuTCuMll-9kDgGvlPhlFov7WAQCHTmUvw,18258
|
41
41
|
mplang/ops/builtin.py,sha256=D7T8rRF9g05VIw9T72lsncF5cDQqaT37eapBieRKvRI,9363
|
@@ -53,13 +53,13 @@ mplang/runtime/__init__.py,sha256=IRPP3TtpFC4iSt7_uaq-S4dL7CwrXL0XBMeaBoEYLlg,94
|
|
53
53
|
mplang/runtime/cli.py,sha256=WehDodeVB4AukSWx1LJxxtKUqGmLPY4qjayrPlOg3bE,14438
|
54
54
|
mplang/runtime/client.py,sha256=vkJUFSDcKIdbKiGUM5AosCKTZygl9g8uZFEjw2xwKig,15249
|
55
55
|
mplang/runtime/communicator.py,sha256=Lek6_h_Wmr_W-_JpT-vMxL3CHxcVZdtf7jdaLGuxPgQ,3199
|
56
|
-
mplang/runtime/data_providers.py,sha256=
|
56
|
+
mplang/runtime/data_providers.py,sha256=GX10_nch8PmEyok32mSC4p5rDowvmXrJ-4J5-LvY6ig,8206
|
57
57
|
mplang/runtime/driver.py,sha256=pq2EQFZK9tH90Idops_yeF6fj0cfFVD_5mFcmy4Hzco,11089
|
58
58
|
mplang/runtime/exceptions.py,sha256=c18U0xK20dRmgZo0ogTf5vXlkix9y3VAFuzkHxaXPEk,981
|
59
59
|
mplang/runtime/http_api.md,sha256=-re1DhEqMplAkv_wnqEU-PSs8tTzf4-Ml0Gq0f3Go6s,4883
|
60
60
|
mplang/runtime/link_comm.py,sha256=uNqTCGZVwWeuHAb7yXXQf0DUsMXLa8leHCkrcZdzYMU,4559
|
61
61
|
mplang/runtime/server.py,sha256=vYjuWTWhhSLHUpsO8FDnOQ8kFzPhE-fXDDyL8GHVPj4,16673
|
62
|
-
mplang/runtime/session.py,sha256=
|
62
|
+
mplang/runtime/session.py,sha256=zDk7lJAeTcimMRqmPNJyfyWODJ4MyidlYE2HLOeLPeE,10269
|
63
63
|
mplang/runtime/simulation.py,sha256=WyIs8ta3ZM5o3RB0Bcb0MUu6Yh88Iujr27KvZFqGxig,11497
|
64
64
|
mplang/simp/__init__.py,sha256=xNXnA8-jZAANa2A1W39b3lYO7D02zdCXl0TpivkTGS4,11579
|
65
65
|
mplang/simp/mpi.py,sha256=Wv_Q16TQ3rdLam6OzqXiefIGSMmagGkso09ycyOkHEs,4774
|
@@ -70,8 +70,8 @@ mplang/utils/crypto.py,sha256=rvPomBFtznRHc3RPi6Aip9lsU8zW2oxBqGv1K3vn7Rs,1052
|
|
70
70
|
mplang/utils/func_utils.py,sha256=vCJcZmu0bEbqhOQKdpttV2_MBllIcPSN0b8U4WjNGGo,5164
|
71
71
|
mplang/utils/spu_utils.py,sha256=S3L9RBkBe2AvSuMSQQ12cBY5Y1NPthubvErSX_7nj1A,4158
|
72
72
|
mplang/utils/table_utils.py,sha256=aC-IZOKkSmFkpr3NZchLM0Wt0GOn-rg_xHBHREWBwAU,2202
|
73
|
-
mplang_nightly-0.1.
|
74
|
-
mplang_nightly-0.1.
|
75
|
-
mplang_nightly-0.1.
|
76
|
-
mplang_nightly-0.1.
|
77
|
-
mplang_nightly-0.1.
|
73
|
+
mplang_nightly-0.1.dev156.dist-info/METADATA,sha256=iaTA5SM0ALRdvM5h40B44CV8WMxsMQXP6DqsPrqeCY4,16547
|
74
|
+
mplang_nightly-0.1.dev156.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
75
|
+
mplang_nightly-0.1.dev156.dist-info/entry_points.txt,sha256=mG1oJT-GAjQR834a62_QIWb7litzWPPyVnwFqm-rWuY,55
|
76
|
+
mplang_nightly-0.1.dev156.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
77
|
+
mplang_nightly-0.1.dev156.dist-info/RECORD,,
|
File without changes
|
{mplang_nightly-0.1.dev154.dist-info → mplang_nightly-0.1.dev156.dist-info}/entry_points.txt
RENAMED
File without changes
|
{mplang_nightly-0.1.dev154.dist-info → mplang_nightly-0.1.dev156.dist-info}/licenses/LICENSE
RENAMED
File without changes
|