Basic Examples 
(3)
 

Build and reduce a tiny term:
In[1]:=
Needs["WolframInstitute`THVMLink`"];​​TInit[];​​TWnf[TApp[TLam[x,x],TLam[y,y]]]
Out[1]=
TTerm
tag: LAM@1
ext: 0

_________________________________________________________________________________________________________________
Build a UOp graph and realize it on the active backend:
In[1]:=
x=TTensorCreate[{1.,2.,3.,4.}];​​y=TTensorCreate[{10.,20.,30.,40.}];​​TTensorData@TRealize[TUOpAdd[x,y]]
Out[1]=
NumericArray
Type: Real32
Dimensions: {4}

_________________________________________________________________________________________________________________
Take a gradient through a small expression (every float leaf is auto-graded, no marking):
In[1]:=
w=TTensorCreate[{1.,2.,3.}];​​x=TTensorCreate[{4.,5.,6.}];​​TRealize@TGrad[TUOpReduce[TUOpMul[w,x],0,"SUM"]];​​TTensorData@TRealize@TGradOf[w]
Out[1]=
NumericArray
Type: Real32
Dimensions: {3}


Scope 
(2)
 


Applications 
(2)
 


Properties and Relations 
(1)
 


Possible Issues

The default
make
target does not rebuild the WL paclet dynamic library; the host
.wlt
tests and notebooks dispatch through the stale
LibraryResources/THVMLink.dylib
. Always run
make&&makewl
from the repository root after touching C sources.