-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
昇腾和寒武纪相关代码退场 npu相关代码退场3 #53699
昇腾和寒武纪相关代码退场 npu相关代码退场3 #53699
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
❌ The PR is not created using PR's template. You can refer to this Demo. |
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.
is_compiled_with_custom_device('npu')
的 if...else...
请两位 看下是否合适现阶段就去掉 @ronny1996 @zhiqiu
python/paddle/static/nn/common.py
Outdated
l_type = 'depthwise_conv2d' | ||
else: | ||
l_type = 'conv2d' | ||
|
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.
@ronny1996 any comment?
@@ -97,8 +97,6 @@ def _get_sys_unsupported_list(dtype): | |||
device = None | |||
if core.is_compiled_with_xpu(): | |||
device = 'XPU' | |||
elif core.is_compiled_with_custom_device('npu'): |
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.
@ronny1996 any comment?
@@ -476,27 +459,17 @@ def _check_finite_and_unscale(self, params_grads): | |||
if self._is_distributed: | |||
# if distributed, split check_finite_and_unscale to overlap | |||
# unscale with communication | |||
if core.is_compiled_with_custom_device('npu'): |
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.
@ronny1996 any comment?
@@ -220,24 +220,7 @@ def backward( | |||
""" | |||
train_program = loss.block.program | |||
self._train_program = train_program | |||
|
|||
# NOTE(zhiqiu): _float_status is only used for NPU. | |||
if core.is_compiled_with_custom_device('npu'): |
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.
@zhiqiu @ronny1996 any comment?
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.
is_compiled_with_custom_device('npu')
的 if...else...
请两位 看下是否合适现阶段就去掉 @ronny1996 @zhiqiu
paddle/phi/api/yaml/ops.yaml
Outdated
@@ -1507,15 +1507,6 @@ | |||
func : nonzero | |||
data_type: condition | |||
|
|||
- op : npu_identity | |||
args : (Tensor x, int format = -1) | |||
output : Tensor |
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.
这里暂时不删除
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#include "paddle/phi/kernels/npu_identity_kernel.h" |
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.
同上
// 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, |
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.
同上
python/paddle/nn/layer/norm.py
Outdated
@@ -725,29 +724,6 @@ def __init__( | |||
) | |||
self._variance.stop_gradient = True | |||
|
|||
# TODO(qili93): temporary for ascned npu performance to be removed along with npu_identity op |
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.
这里暂时不删除
python/paddle/nn/functional/conv.py
Outdated
@@ -145,16 +139,6 @@ def _conv_nd( | |||
new_shape = [1] * len(x.shape) | |||
new_shape[channel_dim] = -1 | |||
bias = bias.reshape(new_shape) | |||
# TODO(qili93): temporary for ascned npu performance to be removed along with npu_identity op | |||
if ( | |||
_global_flags()['FLAGS_npu_storage_format'] |
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.
这里暂时不删除
python/paddle/nn/functional/conv.py
Outdated
@@ -739,29 +716,12 @@ def conv2d( | |||
+ bias.shape | |||
+ [1 for i in range(len(x.shape) - channel_dim - 1)], | |||
) | |||
# TODO(qili93): temporary for ascned npu performance to be removed along with npu_identity op | |||
if ( |
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.
同上
需要解决一下冲突 |
@luotao1 本pr合入后,还有以下NPU可能需要清理:
|
@KimBioInfoStudio 根据#53568 中的评论 ,可能暂时不会被清除了。 |
DeviceEventRecordCustomDevice 和 NPUStorageProperties 都请不要删除,是新增功能和退场的NPU代码无关; |
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.
LGTM
PR types
Others
PR changes
Others
Description
#52319