Skip to content
This repository was archived by the owner on Oct 9, 2019. It is now read-only.
This repository was archived by the owner on Oct 9, 2019. It is now read-only.

Generating a bad OpExecutionModel #237

@aarongreig

Description

@aarongreig

This kernel:

__kernel __attribute__((vec_type_hint(uchar))) void sample_test(__global int *src, __global int *dst)
{
    int  tid = get_global_id(0);
    dst[tid] = src[tid];
}

generated by the OpenCL CTS produces a SPIR-V module with this instruction: OpExecutionMode %entryPoint VecTypeHint 0 when translated with SPIRV-LLVM/build/bin/clang cc1 -emit-spirv -triple spir64-unknown-unknown -cl-std=CL1.2 -include opencl.h -x cl. Zero in the lower 16 bits of the VecTypeHint literal correctly encodes char, but I think the upper 16 should contain a 1 for the vector width. Other type/width combinations from this test seem to be translated correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions