File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -663,6 +663,10 @@ def c_code_cache_version(self):
663663
664664tensor_from_scalar = TensorFromScalar ()
665665
666+ @_vectorize_node .register (TensorFromScalar )
667+ def vectorize_tensor_from_scalar (op , node , batch_x ):
668+ return identity (batch_x ).owner
669+
666670
667671class ScalarFromTensor (COp ):
668672 __props__ = ()
@@ -2046,6 +2050,8 @@ def register_transfer(fn):
20462050"""Create a duplicate of `a` (with duplicated storage)"""
20472051tensor_copy = Elemwise (ps .identity )
20482052pprint .assign (tensor_copy , printing .IgnorePrinter ())
2053+ identity = tensor_copy
2054+ pprint .assign (identity , printing .IgnorePrinter ())
20492055
20502056
20512057class Default (Op ):
@@ -4603,6 +4609,7 @@ def ix_(*args):
46034609 "matrix_transpose" ,
46044610 "default" ,
46054611 "tensor_copy" ,
4612+ "identity" ,
46064613 "transfer" ,
46074614 "alloc" ,
46084615 "identity_like" ,
You can’t perform that action at this time.
0 commit comments