Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal compiler error: Type error after pass 'explicit allocations' #1634

Closed
PhilipBorgesen opened this issue Apr 12, 2022 · 0 comments
Closed

Comments

@PhilipBorgesen
Copy link
Contributor

I got the following internal compiler error with Futhark v0.21.8:

Internal compiler error.  Please report this:
  https://github.com/diku-dk/futhark/issues
Type error after pass 'explicit allocations':
In function entry_main
When checking function body
In expression of statement
  {ext_mem_4588 : ({A_4584, A_mem_4587}, mem),
   main_res_4585 : ({}, i64),
   main_res_4586 : ({}, [main_res_4585]i64 @ ext_mem_4588 ->
                    {base: [ext_mem_4588]; contiguous: true;
                     LMADs: [{offset: 0i64; strides: [1i64]; rotates: [0i64];
                              shape: [ext_mem_4588]; permutation: [0];
                              monotonicity: [Inc]}]})}
Type error:
Expected apply result type:
  [mem, i64, *[?1]i64 @ ?0->
   {base: [?1]; contiguous: true; LMADs: [{offset: 0i64; strides: [1i64];
                                           rotates: [0i64]; shape: [?1];
                                           permutation: [0];
                                           monotonicity: [Inc]}]}]
But annotation is:
  [mem, i64, *[?0]i64 @ ?0->
   {base: [?0]; contiguous: true; LMADs: [{offset: 0i64; strides: [1i64];
                                           rotates: [0i64]; shape: [?0];
                                           permutation: [0];
                                           monotonicity: [Inc]}]}]

A reduced program that causes the error is:

#[noinline]
def double [n] (A: [n]i64) : *[]i64 =
  A ++ A

def main [n] (A: [n]i64) : *[]i64 =
  double A
@athas athas closed this as completed in 0accb8f Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant