umar456 · GitHub

@umar456 @9prady9

This commit addresses very large kernels that were generated by the
JIT for smaller buffers. This was occuring because of how we were
estimating the JIT parameter sizes.
When targeting linear kernels we only pass the pointer to the kernel
instead of the entire dims and stride arrays. This generates smaller
parameter sets so we calculated kernels based on the pointer size
instead of the Param<T> size.
The issue occured when this kernel came in below the threshold for
evaluation but when it was used as a node to another operation, the
generated kernel became a non-linear kernel requiring us to pass
the Param<T> object for each buffer. This causes the size to go past
the limit of the parameters supported by CUDA and compilation fails.
This commit treats all kernels as non-linear kernel when calculating
the parameter sizes.
Fixes arrayfire#2436 arrayfire#2389

Read the original on github.com ↗