Skip to content

Commit 39ea987

Browse files
committed
add register_from_value
1 parent 23ee225 commit 39ea987

File tree

1 file changed

+1
-0
lines changed
  • python/paddle/jit/sot/opcode_translator/executor/variables

1 file changed

+1
-0
lines changed

python/paddle/jit/sot/opcode_translator/executor/variables/callable.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,6 +1263,7 @@ def call_function(self, /, *args, **kwargs):
12631263
obj, self.graph, CreateLayerTracker(self, args, kwargs)
12641264
)
12651265

1266+
@VariableFactory.register_from_value()
12661267
def from_value(value: partial, graph: FunctionGraph, tracker: Tracker):
12671268
if isinstance(value, partial):
12681269
return PartialVariable(value, graph, tracker)

0 commit comments

Comments
 (0)