You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was playing with the new example app snippets and it seems like fusion is broken in some cases. Here's a simplified version of Example1:
// DenseVector, DenseMatrixobjectExample1ARunnerextendsOptiMLApplicationRunnerwithExample1AtraitExample1AextendsOptiMLApplication {
defmain() = {
// 10000x1 DenseVectorvalv1=Vector.rand(10000)
// perform some simple infix operationsvalv2= (v1+10)*2-5// take the pointwise natural log of v2 and sum resultsvallogv2Sum= log(v2).sum
print(logv2Sum)
// print the first 10 elements to the screen
v2(0::10).pprint
}
}
In the generated code, only the *2-5, log and sum are fused, but the rand initialization and +10 remain separate.
Ideally, we'd just compute the first 10 elements anyways...
I was playing with the new example app snippets and it seems like fusion is broken in some cases. Here's a simplified version of Example1:
In the generated code, only the *2-5, log and sum are fused, but the rand initialization and +10 remain separate.
Ideally, we'd just compute the first 10 elements anyways...
Generated code:
The text was updated successfully, but these errors were encountered: