|
| 1 | +// Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +#pragma once |
| 16 | +#include "glog/logging.h" |
| 17 | +#include "paddle/fluid/eager/autograd_meta.h" |
| 18 | +#include "paddle/fluid/eager/utils.h" |
| 19 | +#include "paddle/fluid/framework/op_registry.h" |
| 20 | +#include "paddle/fluid/imperative/tracer.h" |
| 21 | +#include "paddle/phi/api/all.h" |
| 22 | + |
| 23 | +std::tuple<paddle::experimental::Tensor, |
| 24 | + paddle::experimental::Tensor, |
| 25 | + paddle::experimental::Tensor, |
| 26 | + paddle::experimental::Tensor, |
| 27 | + paddle::experimental::Tensor, |
| 28 | + paddle::experimental::Tensor, |
| 29 | + paddle::experimental::Tensor, |
| 30 | + paddle::experimental::Tensor> |
| 31 | +fused_gate_attention_dygraph_function( |
| 32 | + const paddle::experimental::Tensor& Query, |
| 33 | + const paddle::experimental::Tensor& Key, |
| 34 | + const paddle::experimental::Tensor& QueryWeight, |
| 35 | + const paddle::experimental::Tensor& KeyWeight, |
| 36 | + const paddle::experimental::Tensor& ValueWeight, |
| 37 | + const paddle::experimental::Tensor& QKVWeight, |
| 38 | + const paddle::experimental::Tensor& NonbatchedBias, |
| 39 | + const paddle::experimental::Tensor& SrcMask, |
| 40 | + const paddle::experimental::Tensor& GateWeight, |
| 41 | + const paddle::experimental::Tensor& GateBias, |
| 42 | + const paddle::experimental::Tensor& OutLinearWeight, |
| 43 | + const paddle::experimental::Tensor& OutLinearBias, |
| 44 | + const paddle::framework::AttributeMap& attr_map); |
0 commit comments