diku-dk / futhark

:boom::computer::boom: A data-parallel functional programming language
http://futhark-lang.org
ISC License
2.36k stars 165 forks source link

Compilation error : internal error anout dimensions #2089

Closed Alexandre-Da-Cunha-Guiborat closed 6 months ago

Alexandre-Da-Cunha-Guiborat commented 6 months ago

Compilation error :

Type error after pass 'simplify': In function entry_bench_rangeQuery2d_grid When checking function body

In expression of statement {defunc_0_map_res_12821 : ({}, [d<{(/) n 2}>_11508]i64)} in body of last case In expression of statement {partition_res_r_13695 : ({}, [d<{(/) n 2}>_11508][64i64][j_m_i_11541]i64)} 2 indices given, but type of indexee has 3 dimension(s).

This error happens when compiling with a gpu backend such as opencl or cuda.

rangeQuery2d_grid.txt

athas commented 6 months ago

Reduced test case:

entry main =
  map2 (\is vs -> scatter (replicate 20 (replicate 30 true)) is vs)