[Beignet] *** SPAM LEVEL 4.053 *** Throwing the real world at Beignet

Simon Richter Simon.Richter at hogyros.de
Thu Apr 18 11:59:11 PDT 2013


Hi,

I've started playing with the LuxRays[1] raytracer in order to get some
real-world numbers. The two patches I sent earlier are sufficient for
compiling the default OpenCL based raytracer.

Next issues when compiling:

select()
========

| qbvh_kernel.cl:125:12: error: call to 'select' is ambiguous
|     maxt = select(maxt, t.s0, cond0);
|            ^~~~~~
| /tmp/fileXcXZQf.cl:562:26: note: candidate function
| INLINE OVERLOADABLE uint select(uint src0, uint src1, uint cond) {
|                          ^
| /tmp/fileXcXZQf.cl:568:27: note: candidate function
| INLINE OVERLOADABLE float select(float src0, float src1, int cond) {
|                           ^
| /tmp/fileXcXZQf.cl:565:25: note: candidate function
| INLINE OVERLOADABLE int select(int src0, int src1, int cond) {
|                         ^
| /tmp/fileXcXZQf.cl:590:1: note: candidate function
| DECL_SELECT4(int4, int, int4, 0x80000000)
| ^
| /tmp/fileXcXZQf.cl:574:27: note: expanded from:
| INLINE OVERLOADABLE TYPE4 select(TYPE4 src0, TYPE4 src1, COND_TYPE4
cond) { \
|                           ^
| /tmp/fileXcXZQf.cl:591:1: note: candidate function
| DECL_SELECT4(float4, float, int4, 0x80000000)
| ^
| /tmp/fileXcXZQf.cl:574:27: note: expanded from:
| INLINE OVERLOADABLE TYPE4 select(TYPE4 src0, TYPE4 src1, COND_TYPE4
cond) { \
                          ^
The overloads

 - select(uint, uint, uint)
 - select(int, int, int)
 - select(float, float, int)

exist -- their kernel wants to use the same condition to switch both
between uints once and between ints at another point, so one of

 - select(uint, uint, int)
or
 - select(int, int, uint)

would be required. I've made that work with an explicit cast; is the
current implementation conformant, or does the list of existing
overloads need to be changed?

Images
======

| qbvh_kernel.cl:217:36: warning: implicit declaration of function
'get_image_width' is invalid in C99 [-Wimplicit-function-declaration]
|     const int quadTrisImageWidth = get_image_width(quadTris);
|                                    ^

This function does not exist in the spec -- I've tried replacing it with
get_image_dim(...).x, which does, but that appears to be unimplemented.

| qbvh_kernel.cl:226:21: warning: incompatible integer to pointer
conversion initializing 'const sampler_t' (aka
'__attribute__((address_space(5))) unsigned int *const') with an
expression of
|       type 'int';
|     const sampler_t imageSampler = CLK_NORMALIZED_COORDS_FALSE |
CLK_ADDRESS_CLAMP | CLK_FILTER_NEAREST;
|                     ^

Not sure that is legal.

| qbvh_kernel.cl:240:40: warning: implicit declaration of function
'as_float4' is invalid in C99 [-Wimplicit-function-declaration]
|             const float4 bboxes_minX = as_float4(read_imageui(nodes,
imageSampler, (int2)(inx + bboxes_minXIndex, iny)));
|                                        ^
| qbvh_kernel.cl:246:35: warning: implicit declaration of function
'as_int4' is invalid in C99 [-Wimplicit-function-declaration]
|             const int4 children = as_int4(read_imageui(nodes,
imageSampler, (int2)(inx + 6, iny)));
|                                   ^

These are simple conversion functions and appear to be missing.

Assertions
==========

After teaching the raytracer not to use images for data storage, I ran
into an assertion failure during code generation:

| ASSERTION FAILED: Type is not supported by the instruction
|   at file
/home/geier/debian/beignet-0.1+git20130418+0546d2e/backend/src/ir/context.cpp,
function void gbe::ir::Context::append(const gbe::ir::Instruction&),
line 160
| Stack dump:
| 0.      Running pass 'Function Pass Manager' on module
'/tmp/fileQ1KHUR.ll'.
| 1.      Running pass 'Gen Back-End' on function '@Intersect'

Kernel source is attached if anyone wants to take a look without
downloading the entire LuxRays package.

These tests have been run through the ICD loader, by the way :)

   Simon

[1] http://www.luxrender.net/wiki/LuxRays
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: qbvh.cl
URL: <http://lists.freedesktop.org/archives/beignet/attachments/20130418/4a50b0b6/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 380 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/beignet/attachments/20130418/4a50b0b6/attachment.pgp>


More information about the Beignet mailing list