[PATCH] D57768: [SYCL] Add SYCL device compilation flow.

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 11 08:17:57 PST 2019


ABataev added a comment.

In D57768#1392975 <https://reviews.llvm.org/D57768#1392975>, @bader wrote:

> In D57768#1386941 <https://reviews.llvm.org/D57768#1386941>, @ABataev wrote:
>
> > In D57768#1386933 <https://reviews.llvm.org/D57768#1386933>, @bader wrote:
> >
> > > In D57768#1386924 <https://reviews.llvm.org/D57768#1386924>, @ABataev wrote:
> > >
> > > > This definitely requires a test.
> > >
> > >
> > > @ABataev, I tried to find some tests on similar `-fcuda-is-device` and `-fopenmp-is-device` options, but I wasn't able to find a dedicated test. Could you suggest some examples testing similar functionality, please?
> >
> >
> > There are several similar tests:
> >  OpenMP/driver.c, Driver/openmp-offload.c, Driver/openmp-offload-gpu.c. There is no absolutely the same test for OpenMP, since OpenMP has mo similar req for the offloading.
>
>
> @ABataev thanks for the pointers. The uploaded patch adds two options:
>
> - fsycl-is-device (front-end option)
> - sycl-device-only (driver option)
>
>   The driver tests you mention validate driver logic enabled by new options, which is not part of this test and I was going to add it later. I can split the patch and remove new driver option and leave only front-end option. Another option is to add driver logic that invokes the front-end compiler in "device only" mode. Which option do you prefer?


Yes, split the patch into 2. But you still need to add the tests for each of them.
You need to add at least 2 tests:

1. The test that checks that the driver option is converted into the frontend option (driver with `--sycl-device-only` calls the frontend with `-fsycl-is-device`.
2. The test that checks that the frontend option `-fsycl-is-device` adds a new macro definition `__SYCL_DEVICE_ONLY__ 1`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57768/new/

https://reviews.llvm.org/D57768





More information about the cfe-commits mailing list