4 ms·
> You have to hardcode the shape tuples. This is not true. Rather, all shapes have to be known at compile time. That means that output shapes must not depend o
by cl3misch 3y ago
> You have to hardcode the shape tuples.
This is not true. Rather, all shapes have to be known at compile time. That means that output shapes must not depend on input values, but may depend on input shapes -- also explicitely.
Furthermore, there are two useful additions:
1. You can use vanilla numpy for compile-time computations. An example would be computing an array of indices for some moving-window filter, depending on the input shape and a stride parameter.
2. You can mark function arguments as "static". Then their values may change shapes of the output, but accordingly the function is compiled for each value of those arguments.
- sheepscreek 3y agoYou’re right, I apologize for wording it incorrectly. It might have been a restriction with the # of dimensions. Either way, it wasn’t cut out for my use case.