-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Closed
Labels
Description
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 callDone
@script
def foo(a):
# balah
return b
@script
def goo(a):
b = foo(a)
return bfoo 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 inequityDone
if 0 <= a < n:
# balah- 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?