mplang-nightly 0.1.dev332__py3-none-any.whl → 0.1.dev333__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/backends/simp_driver/ops.py +4 -4
- mplang/backends/simp_worker/ops.py +13 -4
- mplang/runtime/interpreter.py +3 -1
- {mplang_nightly-0.1.dev332.dist-info → mplang_nightly-0.1.dev333.dist-info}/METADATA +1 -1
- {mplang_nightly-0.1.dev332.dist-info → mplang_nightly-0.1.dev333.dist-info}/RECORD +8 -8
- {mplang_nightly-0.1.dev332.dist-info → mplang_nightly-0.1.dev333.dist-info}/WHEEL +0 -0
- {mplang_nightly-0.1.dev332.dist-info → mplang_nightly-0.1.dev333.dist-info}/entry_points.txt +0 -0
- {mplang_nightly-0.1.dev332.dist-info → mplang_nightly-0.1.dev333.dist-info}/licenses/LICENSE +0 -0
|
@@ -45,8 +45,8 @@ def _wrap_op_as_graph(op: Operation) -> Graph:
|
|
|
45
45
|
# Create graph inputs
|
|
46
46
|
graph_inputs = [g.add_input(f"in_{i}", any_type) for i in range(len(op.inputs))]
|
|
47
47
|
|
|
48
|
-
# Determine output types
|
|
49
|
-
output_types = [out.type for out in op.outputs]
|
|
48
|
+
# Determine output types (faithfully mirror the original op)
|
|
49
|
+
output_types = [out.type for out in op.outputs]
|
|
50
50
|
|
|
51
51
|
# Add the operation (this handles outputs and value registration)
|
|
52
52
|
g.add_op(
|
|
@@ -77,7 +77,7 @@ def _collect_to_hostvars(results: list[Any], num_outputs: int, world_size: int)
|
|
|
77
77
|
Single DriverVar if num_outputs == 1, else list of DriverVars
|
|
78
78
|
"""
|
|
79
79
|
if num_outputs == 0:
|
|
80
|
-
return
|
|
80
|
+
return []
|
|
81
81
|
|
|
82
82
|
# Transpose [worker][output] -> [output][worker]
|
|
83
83
|
# results[worker_idx] is a list of URIs for that worker's outputs
|
|
@@ -117,7 +117,7 @@ def _generic_simp_dispatch(interpreter: Any, op: Operation, *args: Any) -> Any:
|
|
|
117
117
|
results = driver.collect(futures)
|
|
118
118
|
|
|
119
119
|
# 4. Assemble into DriverVar(s)
|
|
120
|
-
num_outputs = len(op.outputs)
|
|
120
|
+
num_outputs = len(op.outputs)
|
|
121
121
|
return _collect_to_hostvars(results, num_outputs, world_size)
|
|
122
122
|
|
|
123
123
|
|
|
@@ -53,13 +53,19 @@ def _pcall_static_worker_impl(
|
|
|
53
53
|
|
|
54
54
|
try:
|
|
55
55
|
result = interpreter.evaluate_graph(fn_graph, list(args))
|
|
56
|
-
#
|
|
57
|
-
|
|
56
|
+
# Use inner graph's actual output count for safety
|
|
57
|
+
n_out = len(fn_graph.outputs)
|
|
58
|
+
if n_out == 0:
|
|
59
|
+
return []
|
|
60
|
+
return result[0] if n_out == 1 else result
|
|
58
61
|
finally:
|
|
59
62
|
worker.current_parties = prev_parties
|
|
60
63
|
else:
|
|
61
64
|
# No data for this rank
|
|
62
|
-
|
|
65
|
+
n_out = len(op.outputs)
|
|
66
|
+
if n_out == 0:
|
|
67
|
+
return []
|
|
68
|
+
return None if n_out == 1 else [None] * n_out
|
|
63
69
|
|
|
64
70
|
|
|
65
71
|
def _pcall_dynamic_worker_impl(
|
|
@@ -68,7 +74,10 @@ def _pcall_dynamic_worker_impl(
|
|
|
68
74
|
"""Worker implementation of pcall_dynamic."""
|
|
69
75
|
fn_graph = op.regions[0]
|
|
70
76
|
result = interpreter.evaluate_graph(fn_graph, list(args))
|
|
71
|
-
|
|
77
|
+
n_out = len(fn_graph.outputs)
|
|
78
|
+
if n_out == 0:
|
|
79
|
+
return []
|
|
80
|
+
return result[0] if n_out == 1 else result
|
|
72
81
|
|
|
73
82
|
|
|
74
83
|
def _shuffle_static_worker_impl(
|
mplang/runtime/interpreter.py
CHANGED
|
@@ -1082,7 +1082,9 @@ class Interpreter(AbstractInterpreter):
|
|
|
1082
1082
|
return
|
|
1083
1083
|
|
|
1084
1084
|
# Store results
|
|
1085
|
-
if len(op.outputs) ==
|
|
1085
|
+
if len(op.outputs) == 0:
|
|
1086
|
+
pass # Void operation
|
|
1087
|
+
elif len(op.outputs) == 1:
|
|
1086
1088
|
env[op.outputs[0]] = result
|
|
1087
1089
|
else:
|
|
1088
1090
|
for out_val, res in zip(op.outputs, result, strict=True):
|
|
@@ -20,7 +20,7 @@ mplang/backends/util.py,sha256=yrftyGCxOHSfyTawopGhrErUrfgV_5xXqHgEjEY3f8A,3940
|
|
|
20
20
|
mplang/backends/simp_driver/__init__.py,sha256=pQkHGR8HagnPB4OqagPZY-Ul19y6HjIJ5dY6QXZrBH8,1243
|
|
21
21
|
mplang/backends/simp_driver/http.py,sha256=cPcX2f2SIXy6NtQDjSaCJGr8qKut-WcOSmAP2UQomrk,5674
|
|
22
22
|
mplang/backends/simp_driver/mem.py,sha256=sb4TT61VEOf384PoMK2WAOCI0SN_iH03bVLo0e7DLBU,10213
|
|
23
|
-
mplang/backends/simp_driver/ops.py,sha256=
|
|
23
|
+
mplang/backends/simp_driver/ops.py,sha256=pf980pEvKLhsAgvbxNLvK8FEgKA-OF3XaqSYK7yocRo,4486
|
|
24
24
|
mplang/backends/simp_driver/state.py,sha256=dNmYMFN2D2BBdgs6C0YLaHrfaBRMgs05UNxMWw6tZIs,1713
|
|
25
25
|
mplang/backends/simp_driver/values.py,sha256=Lz1utNSIzH-dCzZAEjU6JRcxPsfKGfUJrYl6gIuMOGw,1509
|
|
26
26
|
mplang/backends/simp_worker/__init__.py,sha256=MGfnuvkP6mh9FzSOpLCZ96bgqDydE8GNYCtBhidPiWk,1922
|
|
@@ -31,7 +31,7 @@ mplang/backends/simp_worker/comm_context.py,sha256=EmDNYOpCP5p8nCL1nJcj9Ztua8Kb_
|
|
|
31
31
|
mplang/backends/simp_worker/http.py,sha256=7SEnQE8a-vbNTQEd4xIo2jhI8AsaEqsYZ8IcINsg8qY,35129
|
|
32
32
|
mplang/backends/simp_worker/infra.py,sha256=9f-MpuNbL3vUdkOwGg8EW6ZJPyA41JJTTnTqhvtD4A8,3848
|
|
33
33
|
mplang/backends/simp_worker/mem.py,sha256=2AWTvv1awtGt-GaEpfnGLE9QoeaCCdfz1BgEKklVorA,6171
|
|
34
|
-
mplang/backends/simp_worker/ops.py,sha256=
|
|
34
|
+
mplang/backends/simp_worker/ops.py,sha256=nL83HXTjzrLMX8UFRllxErtBQw4qZonte1Z8Gv8A0Xw,5815
|
|
35
35
|
mplang/backends/simp_worker/request.py,sha256=J_qPh0Crj8DWvrEEzAMt7ie-F4AvEl_1AaYlfWf3TtQ,2771
|
|
36
36
|
mplang/backends/simp_worker/state.py,sha256=nIu0ybvdYqRqp0TkoSneUF2u31evDHucCRduVBaDals,1445
|
|
37
37
|
mplang/dialects/__init__.py,sha256=CYMmkeQVU0Znr9n3_5clZKb16u7acJ5jl5Zjbx4Tn1U,1478
|
|
@@ -103,7 +103,7 @@ mplang/libs/mpc/vole/ldpc.py,sha256=gOmIbyOjkGE5lewyatl3p6FizNNH8LZ_1oOhp_-TOck,
|
|
|
103
103
|
mplang/libs/mpc/vole/silver.py,sha256=EIxhpFIVNBemgeIZzCu5Cz_4wysxRm9b1Xfu0xiweVQ,12218
|
|
104
104
|
mplang/runtime/__init__.py,sha256=VdUwJ3kDaI46FvGw7iMGwcsjt0HTGmmRmaBwj99xKIw,620
|
|
105
105
|
mplang/runtime/dialect_state.py,sha256=HxO1i4kSOujS2tQzAF9-WmI3nChSaGgupf2_07dHetY,1277
|
|
106
|
-
mplang/runtime/interpreter.py,sha256=
|
|
106
|
+
mplang/runtime/interpreter.py,sha256=lUuNC3_LQq-KHHbZWfpErLBCtjRFdpZlUmBg5zX4u9Y,46285
|
|
107
107
|
mplang/runtime/object_store.py,sha256=8Xqr87mkKuQIs-gVZ89Nk62o2GjJDk8meQ4TT66i4aQ,17916
|
|
108
108
|
mplang/runtime/value.py,sha256=EqlhSgxLTJi_FF3ppyKjMe4eHS6-ROx-zK1YesG1U4o,4311
|
|
109
109
|
mplang/tool/__init__.py,sha256=9K-T50W_vClUlyERcVx5xGZaeyv0Ts63SaQX6AZtjIs,1341
|
|
@@ -111,8 +111,8 @@ mplang/tool/program.py,sha256=W3H8bpPirnoJ4ZrmyPYuMCPadJis20o__n_1MKqCsWU,11058
|
|
|
111
111
|
mplang/utils/__init__.py,sha256=Hwrwti2nfPxWUXV8DN6T1QaqXH_Jsd27k8UMSdBGUns,1073
|
|
112
112
|
mplang/utils/func_utils.py,sha256=Jdn_60jN3jcSE_oAqSMTLQjiE8CLyPpY-H1HmPIL5mw,5354
|
|
113
113
|
mplang/utils/logging.py,sha256=9dMhwprVbx1WMGJrgoQbWmV50vyYuLU4NSPnetcl1Go,7237
|
|
114
|
-
mplang_nightly-0.1.
|
|
115
|
-
mplang_nightly-0.1.
|
|
116
|
-
mplang_nightly-0.1.
|
|
117
|
-
mplang_nightly-0.1.
|
|
118
|
-
mplang_nightly-0.1.
|
|
114
|
+
mplang_nightly-0.1.dev333.dist-info/METADATA,sha256=Zn7pj2wncQ_9LHzACWGTrIR44YCBRkhjiVZmiNnVses,16783
|
|
115
|
+
mplang_nightly-0.1.dev333.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
116
|
+
mplang_nightly-0.1.dev333.dist-info/entry_points.txt,sha256=mG1oJT-GAjQR834a62_QIWb7litzWPPyVnwFqm-rWuY,55
|
|
117
|
+
mplang_nightly-0.1.dev333.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
118
|
+
mplang_nightly-0.1.dev333.dist-info/RECORD,,
|
|
File without changes
|
{mplang_nightly-0.1.dev332.dist-info → mplang_nightly-0.1.dev333.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{mplang_nightly-0.1.dev332.dist-info → mplang_nightly-0.1.dev333.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|