From af374ae64c2ceb9f622be6e26a1eb43330540c80 Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Mon, 12 Apr 2021 13:49:53 +0800 Subject: [PATCH] follow comments to refine PR 32144 (#32174) --- paddle/fluid/memory/allocation/npu_allocator.cc | 2 +- paddle/fluid/memory/allocation/npu_allocator.h | 2 +- paddle/fluid/platform/npu_info.cc | 2 +- paddle/fluid/platform/npu_info.h | 2 +- paddle/fluid/platform/stream/npu_stream.cc | 2 +- python/paddle/device.py | 4 +++- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/paddle/fluid/memory/allocation/npu_allocator.cc b/paddle/fluid/memory/allocation/npu_allocator.cc index 4ecdee9bd0..faf7ae6221 100644 --- a/paddle/fluid/memory/allocation/npu_allocator.cc +++ b/paddle/fluid/memory/allocation/npu_allocator.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. +// 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. diff --git a/paddle/fluid/memory/allocation/npu_allocator.h b/paddle/fluid/memory/allocation/npu_allocator.h index 738ec5d3ce..bf66897350 100644 --- a/paddle/fluid/memory/allocation/npu_allocator.h +++ b/paddle/fluid/memory/allocation/npu_allocator.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. +// 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. diff --git a/paddle/fluid/platform/npu_info.cc b/paddle/fluid/platform/npu_info.cc index 6920436399..090945239a 100644 --- a/paddle/fluid/platform/npu_info.cc +++ b/paddle/fluid/platform/npu_info.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. +/* 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. diff --git a/paddle/fluid/platform/npu_info.h b/paddle/fluid/platform/npu_info.h index 648b18531b..1f392f1a53 100644 --- a/paddle/fluid/platform/npu_info.h +++ b/paddle/fluid/platform/npu_info.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. +/* 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. diff --git a/paddle/fluid/platform/stream/npu_stream.cc b/paddle/fluid/platform/stream/npu_stream.cc index 2664ac7194..1c3e153e58 100644 --- a/paddle/fluid/platform/stream/npu_stream.cc +++ b/paddle/fluid/platform/stream/npu_stream.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. +/* 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. diff --git a/python/paddle/device.py b/python/paddle/device.py index d5e4406454..20453998fb 100644 --- a/python/paddle/device.py +++ b/python/paddle/device.py @@ -39,9 +39,11 @@ __all__ = [ _cudnn_version = None +# TODO: WITH_ASCEND_CL may changed to WITH_NPU or others in the future +# for consistent. def is_compiled_with_npu(): """ - Whether this whl package can be used to run the model on NPU. + Whether paddle was built with WITH_ASCEND_CL=ON to support Ascend NPU. Returns (bool): `True` if NPU is supported, otherwise `False`. -- GitLab