-
Notifications
You must be signed in to change notification settings - Fork 5.9k
【custom】split Custom depend header #71036
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
xiaoguoguo626807
merged 20 commits into
PaddlePaddle:develop
from
xiaoguoguo626807:custom_depend
Feb 11, 2025
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
39ab070
[custom] dependency for custom_engine
EnflameGCU 0ea393b
add extention
xiaoguoguo626807 0d07c7c
add .cc
xiaoguoguo626807 08b26ba
add declear
xiaoguoguo626807 dfe2f2d
[GCU] Open more information for instruction
EnflameGCU d7429ec
fix conflict
xiaoguoguo626807 25bcaee
revert fix
xiaoguoguo626807 acbb3f0
Revert "add extention"
xiaoguoguo626807 8cece06
fix conflict
xiaoguoguo626807 a9e5dab
fix conflict
xiaoguoguo626807 647fab5
recover pd_op_to_kernel_pass
xiaoguoguo626807 a427778
modify setup.py
xiaoguoguo626807 7ae0068
fix build
xiaoguoguo626807 da08538
fix build
xiaoguoguo626807 b380d6c
ercover deviceevent
xiaoguoguo626807 79075b9
modify header name
xiaoguoguo626807 a751e83
modify xpu build
xiaoguoguo626807 7c5fa38
delete //
xiaoguoguo626807 fea7017
rename new_executor_base_defs.h
xiaoguoguo626807 633bd45
rename new_executor_base_defs.h
xiaoguoguo626807 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
paddle/fluid/framework/new_executor/instruction/instruction_defs.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| // Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. | ||
| // | ||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
| #pragma once | ||
|
|
||
| #include <unordered_set> | ||
| #include "paddle/phi/core/platform/device_event_base.h" | ||
| #include "paddle/pir/include/core/operation.h" | ||
|
|
||
| namespace paddle { | ||
| namespace framework { | ||
|
|
||
| using SchedulingPriority = int64_t; | ||
|
|
||
| constexpr const char* kCoalesceTensor = "coalesce_tensor"; | ||
|
|
||
| // stream types | ||
| constexpr const char* kCustomStream = "CustomStream"; | ||
| constexpr const char* kDefaultStream = "DefaultStream"; | ||
| constexpr const char* kD2HStream = "D2HStream"; | ||
| constexpr const char* kH2DStream = "H2DStream"; | ||
|
|
||
| constexpr int kEmptyVarIndex = 0; | ||
|
|
||
| struct EventInter { | ||
| explicit EventInter(size_t instr_id, | ||
| std::shared_ptr<platform::DeviceEvent> event, | ||
| platform::DeviceType waiter_type) | ||
| : instr_id_(instr_id), event_(event), waiter_type_(waiter_type) {} | ||
| size_t instr_id_; | ||
| std::shared_ptr<platform::DeviceEvent> event_; | ||
| platform::DeviceType waiter_type_; | ||
| }; | ||
|
|
||
| enum class OpFuncType { | ||
| kCpuSync, // CPU kernel, block host | ||
| kGpuSync, // GPU or other device kernel without asynchronous operation | ||
| kGpuAsync // GPU or other device kernel with asynchronous operation | ||
| }; | ||
|
|
||
| } // namespace framework | ||
| } // namespace paddle | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| // Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 2023 -> 2025
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这些文件是移动,不是新建,所以没改创建日期 |
||
| // | ||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
|
|
||
| #pragma once | ||
|
|
||
| #include <string> | ||
| #include <vector> | ||
|
|
||
| namespace paddle { | ||
| namespace dialect { | ||
| struct PdOpSig { | ||
| std::string name; | ||
| std::vector<std::string> inputs; | ||
| std::vector<std::string> outputs; | ||
| PdOpSig() = default; | ||
| PdOpSig(const PdOpSig& input_info) = default; | ||
|
|
||
| PdOpSig(const std::string& name, | ||
| const std::vector<std::string>& inputs, | ||
| const std::vector<std::string>& outputs) | ||
| : name(name), inputs(inputs), outputs(outputs) {} | ||
| }; | ||
|
|
||
| bool HaveOpToMultiKernelsMap(std::string op_name); | ||
|
|
||
| const std::vector<PdOpSig>& LegacyOpToPdOpsMapping(std::string op_name); | ||
| const std::vector<PdOpSig>& SparseOpToPdOpsMapping(std::string op_name); | ||
|
|
||
| #ifdef PADDLE_WITH_DNNL | ||
| bool IsOneDNNOnlyOp(std::string op_name); | ||
| #endif | ||
|
|
||
| } // namespace dialect | ||
| } // namespace paddle | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,7 @@ | |
|
|
||
| #include <memory> | ||
|
|
||
| #include <climits> | ||
| #include <iterator> | ||
| #include <queue> | ||
| #include <regex> | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2021 -> 2025