Closed fuyw closed 1 year ago
I don't see why this should be integrated into lleaves, it seems extremely specific to your usecase. Why don't these 3 more straightforward ways work for you to store version info with the cache file?
froot_func_name
Hello Simon, many thanks for the reply.
I didn't adopt the previous two ways because I want to keep the cached file name and tree function name the same for different models.
I am not sure if I fully understood the third way. Do you mean I wrote a specific add_version_info
function in C in my project? Then this version info is independent of the cached file (?), any cached file could run with this function.
Anyway, this is indeed a very specific usecase.
Hello Simon,
I tried to add a version info to the compiled model file. In my application, the compiled model name is always the same, and sometimes I want to check if I am using the latest one. Therefore, I want to add an api to show the current version info.
Here is my solution:
I added a
add_version_info()
function, which could be called aftergen_forest(forest, ir, fblocksize, froot_func_name)
. This provides an api to get the model version info. I am not familiar with thellvmlite
grammar, so I simply add a dummy 0 to theversion number
.If you think this function is helpful, I can submit a PR later.