This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Fix default range in non-kernel functions
ClosedPublic

Authored by arsenm on Oct 17 2017, 9:23 PM.

Details

Reviewers
kzhuravl
Summary

The range should be assumed to be the hardware maximum
if a workitem intrinsic is used in a callable function
which does not know the restricted limit of the calling
kernel.

Diff Detail

Event Timeline

arsenm created this revision.Oct 17 2017, 9:23 PM
t-tye added inline comments.Oct 17 2017, 9:29 PM
lib/Target/AMDGPU/AMDGPUSubtarget.cpp
199

Should there be a target property that returns the maximum size supported? 4 * wavefront size may not match every target.

arsenm added inline comments.Oct 23 2017, 9:21 AM
lib/Target/AMDGPU/AMDGPUSubtarget.cpp
199

It's the same for every target now, so there's no real point in adding one.

kzhuravl accepted this revision.Oct 23 2017, 9:24 AM

LGTM.

lib/Target/AMDGPU/AMDGPUSubtarget.cpp
199

I think, if need arises, this can be done in separate change.

This revision is now accepted and ready to land.Oct 23 2017, 9:24 AM
arsenm closed this revision.Oct 23 2017, 10:10 AM

r316346