As suggested by @wsmoses [1] I am adding here the code for executing my kernels where compilation takes a long time. there are two kernels - first takes around 15 minutes, second 54 minutes (earlier I reported couple hours, but current version is faster than what I thought would be the case based on earlier versions) .
In the code, kernels are at the very beginning and enzyme definitions at the very end. Kernels are fully unrolled, all functions are copied... as my initial experiments shown that it make compilation faster. If it will be helpful I will supply not unrolled code. I have also tests to check weather kernels are giving correct results.
All functions apart from first 2 and last two are just helper functions that are not important for the problem are just needed to get the data for running the kernels.
Code is too long to paste it here, Hovewer I prepared a single file with executable code that is available in link below.
As suggested by @wsmoses [1] I am adding here the code for executing my kernels where compilation takes a long time. there are two kernels - first takes around 15 minutes, second 54 minutes (earlier I reported couple hours, but current version is faster than what I thought would be the case based on earlier versions) . In the code, kernels are at the very beginning and enzyme definitions at the very end. Kernels are fully unrolled, all functions are copied... as my initial experiments shown that it make compilation faster. If it will be helpful I will supply not unrolled code. I have also tests to check weather kernels are giving correct results. All functions apart from first 2 and last two are just helper functions that are not important for the problem are just needed to get the data for running the kernels. Code is too long to paste it here, Hovewer I prepared a single file with executable code that is available in link below.
https://github.com/jakubMitura14/superVoxelJuliaCode/blob/master/superVoxelJuliaCode/src/old/long_compilation_issue.jl
1)https://discourse.julialang.org/t/ahead-of-time-compilation-in-1-11/115423/3