Skip to content

Invalid vector floormod rewrite. #8616

Description

@CallahanRL

// If all possible indices in ramp are the same.

I have a counter example to this rewrite. It takes this code
floormod((((threadIdx.x*50) + (b.i.fused.j.fused.inner.outer.inner*8)) + b.i.fused.j.fused.inner.inner.s_1), 20)
to this code:
ramp((floormod(((threadIdx.x*50) + (b.i.fused.j.fused.inner.outer.inner*8)), 20)*32), 32, 8)

The code determines the modular set to have base 0 and coeff 2 but when it computes ramp_max for lanes=8, it incorrectly determines that ramp_min==ramp_max. Perhaps this is always a problem with ceoff*lanes < c2val?

I can't provide a test case because it requires a modified version of vectorize_loop.cc which I can't yet share.

cc @jcf94 @tqchen

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions