ffcx icon indicating copy to clipboard operation
ffcx copied to clipboard

SYCL defines

Open chrisrichardson opened this issue 3 years ago • 5 comments

  • Allow ffcx to produce sycl compatible output

chrisrichardson avatar Jun 28 '21 11:06 chrisrichardson

Can you add some more explanation?

garth-wells avatar Jun 28 '21 12:06 garth-wells

Can you add some more explanation?

Currently it produces some definitions such as:

#define tabulate_cell_a tabulate_tensor_integral_0cc1940dcb4d02004a8f4689364c2ebf7bc61339
#define dim_cell_a0 3
#define dim_cell_a1 3

#define tabulate_cell_L tabulate_tensor_integral_7d5e3ad2bad43b64846403d43f3f8ac26aa57e73
#define dim_cell_L0 3

So one can get the shape of the tensors at compile time.

IgorBaratta avatar Jun 28 '21 12:06 IgorBaratta

This seems a bit ad-hoc because quite a bit more required to use SYCL. How about an option that uses C++ and places the kernel in a header file, and uses constexpr functions to get the dims?

garth-wells avatar Jun 28 '21 13:06 garth-wells

Why is it needed to #define some int? Placing it into a member variable of our static struct wouldn't work with SYCL?

michalhabera avatar Jun 28 '21 13:06 michalhabera

@michalhabera Some values need to be fixed at runtime, e.g.might be required as template arguments.

garth-wells avatar Jun 28 '21 14:06 garth-wells