Skip to content

[js/webgpu] Fix attention shader recompilation issue - #21770

Merged
fs-eire merged 1 commit into
microsoft:mainfrom
qjia7:fix_shader_recompile
Aug 18, 2024
Merged

[js/webgpu] Fix attention shader recompilation issue#21770
fs-eire merged 1 commit into
microsoft:mainfrom
qjia7:fix_shader_recompile

Conversation

@qjia7

@qjia7 qjia7 commented Aug 16, 2024

Copy link
Copy Markdown
Contributor

Description

This PR fixes the AttentionProbsSoftmax recompilation issue when executing the phi3 model. With this fix, it will further improve the phi3 performance.

Motivation and Context

@qjia7 qjia7 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@guschmue @fs-eire @satyajandhyala Please take a look, thanks.

Comment thread js/web/lib/wasm/jsep/webgpu/ops/attention.ts
@fs-eire

fs-eire commented Aug 16, 2024

Copy link
Copy Markdown
Contributor

/azp run Windows ARM64 QNN CI Pipeline,Windows x64 QNN CI Pipeline,Windows CPU CI Pipeline,Windows GPU CUDA CI Pipeline,Windows GPU DML CI Pipeline,Windows GPU Doc Gen CI Pipeline,Windows GPU TensorRT CI Pipeline,ONNX Runtime Web CI Pipeline,Linux CPU CI Pipeline,Linux CPU Minimal Build E2E CI Pipeline

@fs-eire

fs-eire commented Aug 16, 2024

Copy link
Copy Markdown
Contributor

/azp run Linux GPU CI Pipeline,Linux GPU TensorRT CI Pipeline,Linux OpenVINO CI Pipeline,Linux QNN CI Pipeline,MacOS CI Pipeline,orttraining-amd-gpu-ci-pipeline,orttraining-linux-ci-pipeline,orttraining-linux-gpu-ci-pipeline,orttraining-ortmodule-distributed,onnxruntime-binary-size-checks-ci-pipeline

@fs-eire

fs-eire commented Aug 16, 2024

Copy link
Copy Markdown
Contributor

/azp run Big Models,Linux Android Emulator QNN CI Pipeline,Android CI Pipeline,iOS CI Pipeline,ONNX Runtime React Native CI Pipeline

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

2 similar comments
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@fs-eire
fs-eire merged commit c4ade79 into microsoft:main Aug 18, 2024
tianleiwu added a commit that referenced this pull request Aug 19, 2024
commit 7cdeeca
Author: Tianlei Wu <tlwu@microsoft.com>
Date:   Mon Aug 19 07:50:24 2024 -0700

    add tensorboard

commit 5ed7d01
Author: Tianlei Wu <tlwu@microsoft.com>
Date:   Mon Aug 19 01:32:41 2024 -0700

    Upgrade pytorch_lightning to 2.3.3

commit 417aa00
Author: xhcao <xinghua.cao@intel.com>
Date:   Mon Aug 19 06:45:13 2024 +0800

    [js/webgpu] fix conv1d error (#21585)
    <!-- Describe your changes. -->
    <!-- - Why is this change required? What problem does it solve?
    - If it fixes an open issue, please link to the issue here. -->

commit d1d40fb
Author: mingyueliuh <131847423+mingyueliuh@users.noreply.github.com>
Date:   Sun Aug 18 16:51:25 2024 -0400

    [VitisAI][Fix] ShapeInferContext GetAttrxxxs support empty value (#21471)
    Bug fix for the ShapeInferContext GetAttrxxxs APIs. Node attribute maybe
    is empty.
    If the attr value is empty, the expected result through the interface is
    empty , but currently, it returns a meaningless {0}.

    ---------

    Co-authored-by: mingyue <mingyue@amd.com>
    Co-authored-by: Liu Minyue <mingyue@xilinx.com>

commit c018ba4
Author: jingyanwangms <47403504+jingyanwangms@users.noreply.github.com>
Date:   Sun Aug 18 13:26:41 2024 -0700

    [Running CI] [TensorRT EP] support TensorRT 10.3-GA (#21742)
    - TensorRT 10.2.0.19 -> 10.3.0.26
    <!-- - Why is this change required? What problem does it solve?
    - If it fixes an open issue, please link to the issue here. -->

commit c4ade79
Author: Jiajia Qin <jiajia.qin@intel.com>
Date:   Sun Aug 18 08:15:15 2024 +0800

    [js/webgpu] Fix attention shader recompilation issue (#21770)
    <!-- Describe your changes. -->

    This PR fixes the `AttentionProbsSoftmax` recompilation issue when
    executing the phi3 model. With this fix, it will further improve the
    phi3 performance.
    <!-- - Why is this change required? What problem does it solve?
    - If it fixes an open issue, please link to the issue here. -->

commit 49fc168
Author: Yang Gu <yang.gu@intel.com>
Date:   Sun Aug 18 07:41:23 2024 +0800

    [js/webgpu] Handle negative axis in op Split (#21771)

    This is to fix issue #21703, where the axis is a negative value in the
    model. According to the spec
    (https://onnx.ai/onnx/operators/onnx__Split.html), negative axis means
    counting dimensions from the back.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants