Bug 265343 - [WGSL] dot4U8Packed, dot4I8Packed do not appear to be implemented
Summary: [WGSL] dot4U8Packed, dot4I8Packed do not appear to be implemented
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tadeu Zagallo
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-11-25 19:41 PST by Mike Wyrzykowski
Modified: 2024-01-09 06:34 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Wyrzykowski 2023-11-25 19:41:36 PST
[WGSL] dot4U8Packed, dot4I8Packed do not appear to be implemented
https://www.w3.org/TR/WGSL/#dot4U8Packed-builtin
https://www.w3.org/TR/WGSL/#dot4I8Packed-builtin

I think something like (pseudo-code):

fn dot4U8Packed(e1: u32, e2: u32) -> u32

    auto v1 = as_type<uint4>(e1);
    auto v2 = as_type<uint4>(e2);
    return dot(v1, v2);

would work
Comment 1 Radar WebKit Bug Importer 2023-11-25 19:41:51 PST
<rdar://problem/118796882>
Comment 2 Mike Wyrzykowski 2023-11-25 19:56:59 PST
No dot products for integer vector types in metal, so it would be something like:
    return v1[0] * v2[0] + v1[1] * v2[1] + v1[2] * v2[2] + v1[3] * v2[3];
Comment 3 Tadeu Zagallo 2024-01-09 05:08:21 PST
Pull request: https://github.com/WebKit/WebKit/pull/22508
Comment 4 EWS 2024-01-09 06:34:18 PST
Committed 272814@main (2d83031a0ec4): <https://commits.webkit.org/272814@main>

Reviewed commits have been landed. Closing PR #22508 and removing active labels.