onnxruntime icon indicating copy to clipboard operation
onnxruntime copied to clipboard

[ROCm] NGramRepeatBlock, LongformerAttention and DecoderAttention Ops

Open xinyazhang opened this issue 3 years ago • 37 comments

Description: Add NGramRepeatBlock, LongformerAttention and DecoderAttention Op to ROCm and/or enable their tests

Motivation and Context

  • Why is this change required? What problem does it solve?
    • Add and test NGramRepeatBlock, LongformerAttention and DecoderAttention Ops.

xinyazhang avatar Jun 23 '22 22:06 xinyazhang

Pull request contains merge conflicts.

azure-pipelines[bot] avatar Jul 15 '22 03:07 azure-pipelines[bot]

Pull request contains merge conflicts.

azure-pipelines[bot] avatar Jul 15 '22 03:07 azure-pipelines[bot]

can u pls resolve conflicts first? thx

ytaous avatar Jul 15 '22 17:07 ytaous

can u pls resolve conflicts first? thx

Updated @ytaous

xinyazhang avatar Jul 15 '22 23:07 xinyazhang

/azp run Linux CPU CI Pipeline, Linux CPU Minimal Build E2E CI Pipeline, Linux GPU CI Pipeline, Linux GPU TensorRT CI Pipeline, Linux Nuphar CI Pipeline, Linux OpenVINO CI Pipeline, MacOS CI Pipeline, ONNX Runtime Web CI Pipeline, onnxruntime-binary-size-checks-ci-pipeline

ytaous avatar Jul 16 '22 04:07 ytaous

/azp run Windows CPU CI Pipeline, Windows GPU CI Pipeline, Windows GPU TensorRT CI Pipeline, Windows WebAssembly CI Pipeline, orttraining-amd-gpu-ci-pipeline, orttraining-linux-ci-pipeline, orttraining-linux-gpu-ci-pipeline, orttraining-ortmodule-distributed, onnxruntime-python-checks-ci-pipeline

ytaous avatar Jul 16 '22 04:07 ytaous

Azure Pipelines successfully started running 9 pipeline(s).

azure-pipelines[bot] avatar Jul 16 '22 04:07 azure-pipelines[bot]

Azure Pipelines successfully started running 8 pipeline(s).

azure-pipelines[bot] avatar Jul 16 '22 04:07 azure-pipelines[bot]

pls fix lint error

ytaous avatar Jul 18 '22 19:07 ytaous

pls fix lint error

A few remaining lint problems:

  1. s = s.replace(...) in python, which is common practice.
  2. long long int usage in onnxruntime/core/providers/rocm/shared_inc/fpgeneric.h, which is the practice of cuda version.

xinyazhang avatar Jul 18 '22 22:07 xinyazhang

/azp run Windows CPU CI Pipeline, Windows GPU CI Pipeline, Windows GPU TensorRT CI Pipeline, Windows WebAssembly CI Pipeline, orttraining-amd-gpu-ci-pipeline, orttraining-linux-ci-pipeline, orttraining-linux-gpu-ci-pipeline, orttraining-ortmodule-distributed, onnxruntime-python-checks-ci-pipeline

ytaous avatar Jul 18 '22 23:07 ytaous

/azp run Linux CPU CI Pipeline, Linux CPU Minimal Build E2E CI Pipeline, Linux GPU CI Pipeline, Linux GPU TensorRT CI Pipeline, Linux Nuphar CI Pipeline, Linux OpenVINO CI Pipeline, MacOS CI Pipeline, ONNX Runtime Web CI Pipeline, onnxruntime-binary-size-checks-ci-pipeline

ytaous avatar Jul 18 '22 23:07 ytaous

Azure Pipelines successfully started running 8 pipeline(s).

azure-pipelines[bot] avatar Jul 18 '22 23:07 azure-pipelines[bot]

Azure Pipelines successfully started running 9 pipeline(s).

azure-pipelines[bot] avatar Jul 18 '22 23:07 azure-pipelines[bot]

I think the C++ lint error is a false alert. Those lines do not exceed the 120-character limit The Python is the conventional s = s.replace(...) practice.

xinyazhang avatar Jul 19 '22 08:07 xinyazhang

Hi any update on this? No hurry, we can try to close the others before this one, thx.

ytaous avatar Aug 02 '22 21:08 ytaous

Hi any update on this? No hurry, we can try to close the others before this one, thx.

Working on PR #11968 and #11972 now. Will go back to this one after pushing necessary changes.

xinyazhang avatar Aug 02 '22 22:08 xinyazhang

$ (cd ./branch_build/$(git branch --show-current)/RelWithDebInfo/; ./onnxruntime_test_all --gtest_filter='NGramRepeatBlockTest.*:LongformerAttentionTest.*:DecoderAttentionTest.*:')
...
[----------] Global test environment tear-down
[==========] 13 tests from 3 test suites ran. (4578 ms total)
[  PASSED  ] 13 tests.

GPU Utilization confirmed with AMD_LOG_LEVEL=3.

Full log files: pool_v2.log pool_v2_gpu.log

xinyazhang avatar Aug 03 '22 01:08 xinyazhang

/azp run Linux CPU CI Pipeline, Linux CPU Minimal Build E2E CI Pipeline, Linux GPU CI Pipeline, Linux GPU TensorRT CI Pipeline, Linux Nuphar CI Pipeline, Linux OpenVINO CI Pipeline, MacOS CI Pipeline, ONNX Runtime Web CI Pipeline, onnxruntime-binary-size-checks-ci-pipeline

ytaous avatar Aug 03 '22 01:08 ytaous

/azp run Windows CPU CI Pipeline, Windows GPU CI Pipeline, Windows GPU TensorRT CI Pipeline, Windows WebAssembly CI Pipeline, orttraining-amd-gpu-ci-pipeline, orttraining-linux-ci-pipeline, orttraining-linux-gpu-ci-pipeline, orttraining-ortmodule-distributed, onnxruntime-python-checks-ci-pipeline

ytaous avatar Aug 03 '22 01:08 ytaous

Azure Pipelines successfully started running 9 pipeline(s).

azure-pipelines[bot] avatar Aug 03 '22 01:08 azure-pipelines[bot]

Azure Pipelines successfully started running 8 pipeline(s).

azure-pipelines[bot] avatar Aug 03 '22 01:08 azure-pipelines[bot]

fyi - https://github.com/microsoft/onnxruntime/pull/12435

ytaous avatar Aug 03 '22 06:08 ytaous

fyi - #12435

it's merged, can u please update it as needed? thx

ytaous avatar Aug 03 '22 18:08 ytaous

/azp run Windows CPU CI Pipeline, Windows GPU CI Pipeline, Windows GPU TensorRT CI Pipeline, Windows WebAssembly CI Pipeline, orttraining-amd-gpu-ci-pipeline, orttraining-linux-ci-pipeline, orttraining-linux-gpu-ci-pipeline, orttraining-ortmodule-distributed, onnxruntime-python-checks-ci-pipeline

ytaous avatar Aug 03 '22 23:08 ytaous

/azp run Linux CPU CI Pipeline, Linux CPU Minimal Build E2E CI Pipeline, Linux GPU CI Pipeline, Linux GPU TensorRT CI Pipeline, Linux Nuphar CI Pipeline, Linux OpenVINO CI Pipeline, MacOS CI Pipeline, ONNX Runtime Web CI Pipeline, onnxruntime-binary-size-checks-ci-pipeline

ytaous avatar Aug 03 '22 23:08 ytaous

Azure Pipelines successfully started running 8 pipeline(s).

azure-pipelines[bot] avatar Aug 03 '22 23:08 azure-pipelines[bot]

Azure Pipelines successfully started running 9 pipeline(s).

azure-pipelines[bot] avatar Aug 03 '22 23:08 azure-pipelines[bot]

heads up - https://github.com/microsoft/onnxruntime/pull/12448

ytaous avatar Aug 03 '22 23:08 ytaous

@iK1D - pls also take a look, thx

ytaous avatar Aug 08 '22 20:08 ytaous