taco
taco copied to clipboard
Cache generated code across sessions
This is a feature request. I would like to reduce runtime costs of calling TACO by caching the generated code in a file, and checking for that file the next time my application is executed. To cache kernels across sessions of TACO, we would need to implement a name mangling scheme that produces a unique filename for each index expression and user-provided schedule. i.e. the code for the expression A(i, j) += B(i, k) * C(k, j)
should be stored in a file A_ij_pluseq_B_ik_times_C_kj.c
, or similar. We can reduce duplicate storage for differently-named tensors with some form of de Bruijn naming, i.e. 1_12_pluseq_2_13_times_3_32.c
, or similar. If human-readable filenames are unnecessary, we can use a long-enough static hash that it is virtually impossible to have collisions, the UUID approach.