> On Sep 16, 2017, at 20:15, Jan Vesely <[email protected]> wrote:
>>
>> +#ifndef __AMDGCN__
>> +#error This test is only for amdgcn
>> +#endif
>
> This needs "device_regexp" in config section to skip instead of fail on
> other platforms/devices.
>
I’ve tried doing this, but there isn’t really a satisfactory way to test for
this. While ROCm uses the consistent gfxNNN device names, clover and the older
OpenCL platforms use the various device names which ends up just being an
exhaustive list. The names are also slightly different for the same devices
between those.
Additionally, this feature seems to not work and no other test is using it. If
I use just device_regex, I get errors about the platform:
# Skipping platform AMD Accelerated Parallel Processing because it does not
match platform_regex.
If I add the exact platform name, it works. If I additionally add a device_name
regex, I get the same error about the platform name. Quickly looking at the
code I don’t see any reason why these would be linked.
>> +// The inline asm is necessary to defeat interprocedural sparse
>> +// conditional constant propagation eliminating some of the trivial
>> +// calls.
>> +#ifdef __AMDGCN__
>> +#define USE_ASM 1
>> +#endif
>
> I think it'd be better to use build options to disable the opt pass
> instead (or all optimizations, like optimization-options-cl1X.cl
> tests).
>
> Jan
>
-O0 is far heavier than this test should get. We really want testing with full
optimizations, the code is pretty radically different at -O0 in all programs.
Ideally we would have every test running at -O0 and other opt levels for best
coverage.
We could defeat this optimization in particular by keeping the function
externally visible, but right now we are forced to internalize every program
before codegen so this is always a problem for us. I don’t see any specific
switch to disable this particular pass. Other methods might be using a volatile
variable for the constant (which I don’t want because that introduces stack
usage, which these tests specifically do not want). I could try to find other
convoluted methods of defeating the optimization, but those will also end up
contrary to the goal of having easily readable isa for these.
-Matt
_______________________________________________
Piglit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/piglit