Skip to content

Certain tile sizes trigger an assertion #1

@sebastiankreutzer

Description

@sebastiankreutzer

When using user-directed tiling, for certain tile sizes, the following assertion is triggered:

/home/sebastian/git/llvm-project-sollve/polly/lib/External/isl/isl_aff.c:8169: cannot extract range space from empty input

This seems to occur when both

  • The trip count is a compile time constant
  • For every loop, the trip count is a multiple of the chosen tile size

Consider the following code:

#define N 64
#define M 32

void foo(float* __restrict__ a, float* __restrict__  b, float* __restrict__ c) {
#pragma clang loop(i, j) tile sizes(32, 16) floor_ids(i1, j1) tile_ids(i2, j1) peel(rectangular)
#pragma clang loop id(i)
  for (int i = 0; i < N; i++) {
#pragma clang loop id(j)
    for (int j = 0; j < M; j++) {
        c[i] += a[i*N+j] * b[j];
    }
  }
}

For the given tile sizes (32, 16), compilation will fail.
On the other hand, tile sizes such as (5, 16), (32, 5), where the trip count is not divisible by each size, work fine.

Here's the full stack trace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions