The file indexing.jl contains the lines
# attach range metadata
range_metadata = MDNode([ConstantInt(Int32(range.start)),
ConstantInt(Int32(range.stop))])
metadata(idx)[LLVM.MD_range] = range_metadata
LLVM range metadata https://llvm.org/docs/LangRef.html#range-metadata are described by a half-open interval, as is common in C++. Thus range.stop needs to be range.stop + 1 in the code above.
This error leads to weird code generation problems when checking block or grid sizes just below the maximum possible.
(Having the lower bound there is a good idea. I am not sure about the upper bounds as they may increase in newer architectures, and without updating the bounds here we would generate wrong code for these architectures.)
The file
indexing.jlcontains the linesLLVM range metadata https://llvm.org/docs/LangRef.html#range-metadata are described by a half-open interval, as is common in C++. Thus
range.stopneeds to berange.stop + 1in the code above.This error leads to weird code generation problems when checking block or grid sizes just below the maximum possible.
(Having the lower bound there is a good idea. I am not sure about the upper bounds as they may increase in newer architectures, and without updating the bounds here we would generate wrong code for these architectures.)