Skip to content

Cannot distinguish between host/device warnings and errors #1254

Closed
@Pennycook

Description

@Pennycook

I'm not sure if this issue is specific to kernel attributes or has wider applicability, but it can be difficult to understand whether host or device compilation is producing a given warning or error.

I'm most concerned about cases when only one of the compilers produces a warning, as below:

#include <CL/sycl.hpp>
using namespace sycl;

int main(int argc, char* argv[])
{
    queue q;
    q.submit([&](handler& cgh)
    {
        cgh.single_task<class test>([]() [[cl::intel_reqd_sub_group_size(8)]]
        {
        });
    });
}
reqd_sub_group_size.cpp:9:44: warning: 'intel_reqd_sub_group_size' attribute ignored [-Wignored-attributes]
        cgh.single_task<class test>([]() [[cl::intel_reqd_sub_group_size(8)]]
                                           ^
1 warning generated.

It is not clear from this message that the attribute was ignored on the host but respected on the device (or that this is expected behavior). Is there any way we could make this more obvious, like inserting the words "host" and "device" into the compilation output somewhere?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions