This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Disable fp64 support on pre-GCN asics
ClosedPublic

Authored by jvesely on Nov 10 2017, 4:54 PM.

Details

Summary

it's not implemented
Passing +fp64-fp16-denormal feature enables fp64 even on asics that don't support it

Diff Detail

Repository
rL LLVM

Event Timeline

jvesely created this revision.Nov 10 2017, 4:54 PM
arsenm edited edge metadata.Nov 11 2017, 9:52 AM

Fp64 denormals are always supported

Fp64 denormals are always supported

This makes no sense, it was clearly disabled on line 70 before for <= NI. This change just makes sure it does not enable fp64 en masse on all asics in the process.

FP64 denormals are not supported if fp64 is not supported.
Moreover, table 8.1 in R900 ISA docs show that adding a denormal has no effect if the other operand is finite, and adding 2 denormals is 0.
The same for EG in table 9.1 (R800 ISA docs).

FP64 support without denormals doesn't make sense. They are mandatory in the OpenCL spec

FP64 support without denormals doesn't make sense. They are mandatory in the OpenCL spec

so what? this has clearly been disabled before, and it stays disabled after this change, just with less damage done in the process..

enabling fp64 denormals can be considered when fp64 support is added to eg/ni targets.

Fp64 denormals are always supported

FP64 support without denormals doesn't make sense. They are mandatory in the OpenCL spec

so what? this has clearly been disabled before, and it stays disabled after this change, just with less damage done in the process..

enabling fp64 denormals can be considered when fp64 support is added to eg/ni targets.

The Evergreen manual lists double_denorm_flush_input and double_denorm_force_underflow_to_zero modes, so that implies they are supported. I don't care that much because the f64 support is missing, but I'm not sure what problem you are trying to solve here

lib/Target/AMDGPU/AMDGPUSubtarget.cpp
62 ↗(On Diff #122558)

You shouldn't explicitly disable them either if it's not a recognized feature for r600

Fp64 denormals are always supported

FP64 support without denormals doesn't make sense. They are mandatory in the OpenCL spec

so what? this has clearly been disabled before, and it stays disabled after this change, just with less damage done in the process..

enabling fp64 denormals can be considered when fp64 support is added to eg/ni targets.

The Evergreen manual lists double_denorm_flush_input and double_denorm_force_underflow_to_zero modes, so that implies they are supported.

I'll double check if it matches it specs when fp64 gets added, afaik it's not consistent for all instructions.

I don't care that much because the f64 support is missing, but I'm not sure what problem you are trying to solve here

the problem is that fp64-fp16-denormals feature depends on fp64 feature, thus passing "+fp64-fp16-denormals" string enables fp64 on all ASICs, including those (like almost all EG) that don't support fp64. THus I can't use 'if (hasFP64())' to in isel.
This needs to work for FMA (not available without fp64, the instruction executes fine but returns 0).

The alternative is to drop fp64-fp16-denormlas dependency on fp64 and change the has*() function to check for both.

jvesely marked an inline comment as done.Nov 20 2017, 1:36 PM

ping

lib/Target/AMDGPU/AMDGPUSubtarget.cpp
62 ↗(On Diff #122558)

it is recognized, just not supported atm

jvesely updated this revision to Diff 125055.Nov 30 2017, 4:55 PM
jvesely marked an inline comment as done.
jvesely retitled this revision from AMDGPU: Don't try to enable fp64 denormals on <SI to AMDGPU: Disable fp64 support on pre-GCN asics.
jvesely edited the summary of this revision. (Show Details)

just didable fp64 on pregcn asics

arsenm accepted this revision.Dec 1 2017, 1:50 PM

LGTM

This revision is now accepted and ready to land.Dec 1 2017, 1:50 PM
This revision was automatically updated to reflect the committed changes.