Hybrid Script is still under a very preliminary stage of development.
Comparing with its counterpart in FaceBook, TorchScript, a lot of syntax sugars are not supported yet.
Global function call Done
@script
def foo(a):
# balah
return b
@script
def goo(a):
b = foo(a)
return b
foo can be found in __global__ dict, so it is not hard to do this I believe.
- Tensor level operations
# RFC
# actually, all these tensor operation rules will be hardcoded in the compiler
# i do not want to make it super complicate...
Triple inequity Done
- In-place Operator
#RFC: Is this one good enough? Users are required to explicitly return the tensor with side effect.
@script
def goo(a):
for i in range(a.shape[0]):
a[i] += 1
return a
@kevinthesun Any more suggestions?
Hybrid Script is still under a very preliminary stage of development.
Comparing with its counterpart in FaceBook, TorchScript, a lot of syntax sugars are not supported yet.
Global function callDonefoocan be found in__global__dict, so it is not hard to do this I believe.Triple inequityDone@kevinthesun Any more suggestions?