已合并
Revert "_npu_paged_attention_splitfuse_v2的context_lens输入添加host数据绑定" #5457
hellokitty911创建于 7月13日
Revert "_npu_paged_attention_splitfuse_v2的context_lens输入添加host数据绑定" #5457
已合并
共 1 个文件变更+0-6
| @@ -18,9 +18,6 @@ | |||
| 18 | 18 | ||
| 19 | using namespace std; | 19 | using namespace std; |
| 20 | 20 | ||
| 21 | -namespace { | ||
| 22 | - constexpr int64_t CONTEXT_LENS_INDEX = 4; | ||
| 23 | -} | ||
| 24 | namespace atb { | 21 | namespace atb { |
| 25 | using PagedAttentionParam = atb::infer::PagedAttentionParam; | 22 | using PagedAttentionParam = atb::infer::PagedAttentionParam; |
| 26 | 23 | ||
| @@ -69,9 +66,6 @@ void _npu_paged_attention_splitfuse_v2(const at::Tensor &query, const at::Tensor | |||
| 69 | .Input(mask) | 66 | .Input(mask) |
| 70 | .Input(seq_len, true) | 67 | .Input(seq_len, true) |
| 71 | .Output(out); | 68 | .Output(out); |
| 72 | - at::Tensor context_lens_cpu = context_lens.cpu(); | ||
| 73 | - paramsetter.variant_pack_.inTensors[CONTEXT_LENS_INDEX].hostData = context_lens_cpu.data_ptr(); | ||
| 74 | - paramsetter.tensor_maintainer_.cpu_tensors.emplace_back(std::move(context_lens_cpu)); | ||
| 75 | auto opPaged = pagedAttentionParamCache.getOperation(pagedparam, "PagedAttentionOperation"); | 69 | auto opPaged = pagedAttentionParamCache.getOperation(pagedparam, "PagedAttentionOperation"); |
| 76 | RunAtbCmd(opPaged, paramsetter, "PagedAttentionOperation"); | 70 | RunAtbCmd(opPaged, paramsetter, "PagedAttentionOperation"); |
| 77 | 71 | ||