Skip to content

(OpenCL) device.type is incorrect #84

Description

@takinutani

Get Device Type result is incorrect

At tests/main.d, I tried printing the device information,

    auto devices  = platform.getDevices(theAllocator);
    writeln("Devices:");
    foreach (i, ref d; devices)
    {
        writefln("\t[%d] %s", i, d.name);
        writefln("\t\t%s", d.vendor);
        writefln("\t\t(%d)%s", d.type, d.type);
        writefln("\t\t(%d)%s", d.queueProperties, d.queueProperties);
        writefln("\t\t(%d)%s", d.floatFPConfig, d.floatFPConfig);
        writefln("\t\t(%d)%s", d.GLobalMemoryCacheType, d.GLobalMemoryCacheType);
        writefln("\t\t(%d)%s", d.executionCapabilities, d.executionCapabilities);

    }

Outputs

Devices:
        [0] AMD Ryzen 7 8700G w/ Radeon 780M Graphics
                Intel(R) Corporation
                (1)default_
                (1)outOfOrderExecution
                (1)denorm
                (2)readWrite
                (0)kernel

The device type was expected to be a CPU (0x2).

The cause was a difference in the size of the enum type.

WIP: modify device.d/queue.d

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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