Skip to content

Commit

Permalink
Merge branch 'op2func_refactor' of https://github.com/chenwhql/Paddle
Browse files Browse the repository at this point in the history
…into op2func_refactor
  • Loading branch information
chenwhql committed Oct 20, 2021
2 parents d3674e9 + f1c9661 commit 4e2c0dd
Show file tree
Hide file tree
Showing 20 changed files with 838 additions and 15 deletions.
7 changes: 5 additions & 2 deletions paddle/pten/common/data_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,20 @@ inline size_t SizeOf(DataType data_type) {
PADDLE_THROW(platform::errors::Unimplemented(
"Data type %d is not supported by tensor.",
static_cast<int>(data_type)));
return 0;
}
return 0;
}

#define PT_FOR_EACH_DATA_TYPE(_) \
_(bool, DataType::BOOL) \
_(int8_t, DataType::INT8) \
_(uint8_t, DataType::UINT8) \
_(int16_t, DataType::INT16) \
_(int, DataType::INT32) \
_(uint16_t, DataType::UINT16) \
_(int32_t, DataType::INT32) \
_(uint32_t, DataType::UINT32) \
_(int64_t, DataType::INT64) \
_(uint64_t, DataType::UINT64) \
_(bfloat16, DataType::BFLOAT16) \
_(float16, DataType::FLOAT16) \
_(float, DataType::FLOAT32) \
Expand Down
4 changes: 4 additions & 0 deletions paddle/pten/core/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
add_subdirectory(candidate)

IF(WITH_MKLDNN)
set(MKLDNN_CTX_DEPS mkldnn)
ELSE()
Expand All @@ -15,3 +17,5 @@ cc_library(dense_tensor SRCS dense_tensor.cc DEPS enforce data_type ddim allocat

cc_library(kernel_factory SRCS kernel_factory.cc DEPS enforce)
cc_library(kernel_context SRCS kernel_context.cc DEPS enforce device_context)

cc_library(tensor_base SRCS tensor_base.cc allocator.cc storage.cc DEPS enforce)
14 changes: 8 additions & 6 deletions paddle/pten/core/allocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ namespace pten {
/// deallocation and construction/destruction of objects.
class RawAllocator {
public:
using Place = paddle::platform::Place;

/// \brief Default destructor.
virtual ~RawAllocator() = default;

Expand All @@ -43,7 +45,7 @@ class RawAllocator {

/// \brief Get the place value of the allocator and the allocation.
/// \return The place value of the allocator and the allocation.
virtual const paddle::platform::Place& place() const = 0;
virtual const Place& place() const = 0;
};

/// \brief Fancy pointer with context. The use of this data type
Expand All @@ -52,24 +54,24 @@ class RawAllocator {
/// support being inherited.
class Allocation final {
public:
using Place = paddle::platform::Place;
using DeleterFnPtr = void (*)(void*);

Allocation() = default;
Allocation(Allocation&&) = default;
Allocation& operator=(Allocation&&) = default;

Allocation(void* data, const paddle::platform::Place& place)
: data_(data), place_(place) {}
Allocation(void* data, const Place& place) : data_(data), place_(place) {}

Allocation(void* data,
void* ctx,
DeleterFnPtr ctx_deleter,
const paddle::platform::Place& place)
const Place& place)
: data_(data), ctx_(ctx, ctx_deleter), place_(place) {}

void* operator->() const noexcept { return data_; }
operator bool() const noexcept { return data_ || ctx_.Get(); }
const paddle::platform::Place& place() const noexcept { return place_; }
const Place& place() const noexcept { return place_; }

void Clear() noexcept {
data_ = nullptr;
Expand Down Expand Up @@ -132,7 +134,7 @@ class Allocation final {
Context ctx_;
// TODO(Shixiaowei02): Enum needs to be used instead to reduce
// the construction overhead by more than 50%.
paddle::platform::Place place_;
Place place_;
};

inline void swap(Allocation::Context& a, Allocation::Context& b) noexcept {
Expand Down
1 change: 1 addition & 0 deletions paddle/pten/core/candidate/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cc_library(pten_dense_tensor SRCS dense_tensor.cc DEPS tensor_base)
145 changes: 145 additions & 0 deletions paddle/pten/core/candidate/dense_tensor.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
/* 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. */

#include "paddle/pten/core/candidate/dense_tensor.h"

namespace pten {
namespace candidate {

DenseTensorMeta::DenseTensorMeta(DataType type, const DDim& dims)
: dims(dims), type(type) {}
DenseTensorMeta::DenseTensorMeta(DataType type,
const DDim& dims,
DataLayout layout)
: dims(dims), type(type), layout(layout) {}
DenseTensorMeta::DenseTensorMeta(DataType type,
const DDim& dims,
DataLayout layout,
const std::vector<std::vector<size_t>>& lod)
: dims(dims), type(type), layout(layout), lod(lod) {}

bool DenseTensorMeta::valid() const noexcept {
bool valid{true};
valid = valid && (type != DataType::UNDEFINED);
valid = valid && (layout != DataLayout::UNDEFINED);
valid = valid && (is_scalar || product(dims));
return valid;
}

DenseTensor::DenseTensor(const std::shared_ptr<Allocator>& a,
const DenseTensorMeta& meta)
: meta_(meta),
storage_(
make_intrusive<TensorStorage>(a, SizeOf(data_type()) * numel())) {}

DenseTensor::DenseTensor(const std::shared_ptr<Allocator>& a,
DenseTensorMeta&& meta)
: meta_(std::move(meta)),
storage_(
make_intrusive<TensorStorage>(a, SizeOf(data_type()) * numel())) {}

DenseTensor::DenseTensor(intrusive_ptr<Storage> storage,
const DenseTensorMeta& meta)
: meta_(meta), storage_(std::move(storage)) {}

DenseTensor::DenseTensor(intrusive_ptr<Storage> storage, DenseTensorMeta&& meta)
: meta_(std::move(meta)), storage_(std::move(storage)) {}

int64_t DenseTensor::numel() const {
if (meta_.is_scalar) {
return 1;
}
return product(meta_.dims);
}

bool DenseTensor::SharesStorageWith(const DenseTensor& b) const {
return storage_.get() == b.storage_.get() && storage_.get() != nullptr;
}

template <typename T>
T* DenseTensor::mutable_data(size_t request_bytes) {
PADDLE_ENFORCE(
valid(),
paddle::platform::errors::PreconditionNotMet(
"The meta data must be valid when call the mutable data function."));
PADDLE_ENFORCE_NOT_NULL(
storage_,
paddle::platform::errors::PreconditionNotMet(
"The storage must be valid when call the mutable data function."));
PADDLE_ENFORCE(
(data_type() == paddle::experimental::CppTypeToDataType<T>::Type()),
paddle::platform::errors::PreconditionNotMet(
"The type of data we are trying to retrieve does not match the "
"type of data currently contained in the container."));
size_t bytes = numel() * SizeOf(data_type());
if (request_bytes) {
PADDLE_ENFORCE_GE(request_bytes,
bytes,
paddle::platform::errors::InvalidArgument(
"The reserved size %d should be enough to meet the "
"volume required by metadata %d.",
request_bytes,
bytes));
bytes = request_bytes;
}
if (storage_->size() < bytes) {
storage_->Realloc(bytes);
}
return static_cast<T*>(storage_->data());
}

template <typename T>
const T* DenseTensor::data() const {
PADDLE_ENFORCE_NOT_NULL(
storage_,
paddle::platform::errors::PreconditionNotMet(
"The storage must be valid when call the mutable data function."));
PADDLE_ENFORCE(
(data_type() == paddle::experimental::CppTypeToDataType<T>::Type()),
paddle::platform::errors::PreconditionNotMet(
"The type of data we are trying to retrieve does not match the "
"type of data currently contained in the container."));
return static_cast<const T*>(storage_->data());
}

void DenseTensor::check_memory_size() const {
size_t bytes = numel() * SizeOf(data_type());
PADDLE_ENFORCE_GE(memory_size(),
bytes,
paddle::platform::errors::InvalidArgument(
"The memory size %d should be enough to meet the "
"volume required by metadata %d.",
memory_size(),
bytes));
}

#define DATA_MEMBER_FUNC_INSTANTIATION(dtype) \
template dtype* DenseTensor::mutable_data(size_t request_bytes); \
template const dtype* DenseTensor::data() const;

DATA_MEMBER_FUNC_INSTANTIATION(int8_t);
DATA_MEMBER_FUNC_INSTANTIATION(uint8_t);
DATA_MEMBER_FUNC_INSTANTIATION(int16_t);
DATA_MEMBER_FUNC_INSTANTIATION(uint16_t);
DATA_MEMBER_FUNC_INSTANTIATION(int32_t);
DATA_MEMBER_FUNC_INSTANTIATION(uint32_t);
DATA_MEMBER_FUNC_INSTANTIATION(int64_t);
DATA_MEMBER_FUNC_INSTANTIATION(uint64_t);
DATA_MEMBER_FUNC_INSTANTIATION(float);
DATA_MEMBER_FUNC_INSTANTIATION(double);

#undef DATA_MEMBER_FUNC_INSTANTIATION

} // namespace candidate
} // namespace pten
Loading

1 comment on commit 4e2c0dd

@paddle-bot-old
Copy link

@paddle-bot-old paddle-bot-old bot commented on 4e2c0dd Oct 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵️ CI failures summary

🔍 PR: #34425 Commit ID: 4e2c0dd contains failed CI.

🔹 Failed: PR-CI-APPROVAL

approve_failed
2021-10-20 23:07:52 正在保存至: “bk.txt”
2021-10-20 23:07:52 0K 100% 3.09M=0s
2021-10-20 23:07:52 2021-10-20 23:07:52 (3.09 MB/s) - 已保存 “bk.txt” [5/5])
2021-10-20 23:07:59 ****************
2021-10-20 23:07:59 0. You must have one RD (lanxianghit (Recommend), phlrain or luotao1) approval for changing the FLAGS, which manages the environment variables.
2021-10-20 23:07:59 1. You must have Dianhai approval for change 20+ files or add than 1000+ lines of content.
2021-10-20 23:07:59 2. You must have one RD (XiaoguangHu01,chenwhql,zhiqiu,Xreki,luotao1) approval for paddle/fluid/framework/operator.h, which manages the underlying code for fluid.
2021-10-20 23:07:59 3. You must have one RD (zhiqiu (Recommend) , phlrain) approval for the changes of paddle/fluid/pybind/op_function_generator.cc, which manages the logic of automatic generating op functions for dygraph.
2021-10-20 23:07:59 4. You must have one RD (XiaoguangHu01,chenwhql,zhiqiu,Xreki,luotao1) approval for the usage of const_cast.
2021-10-20 23:07:59 5. You must have one RD (Avin0323(Recommend) or zhouwei25 or wanghuancoder or luotao1) approval for modifying unity_build_rule.cmake which the rules of Unity Build.
2021-10-20 23:07:59 There are 6 approved errors.
2021-10-20 23:07:59 ****************
2021-10-20 23:07:59 + EXCODE=6
2021-10-20 23:07:59 + echo 'EXCODE: 6'
2021-10-20 23:07:59 EXCODE: 6
2021-10-20 23:07:59 + echo 'ipipe_log_param_EXCODE: 6'
2021-10-20 23:07:59 ipipe_log_param_EXCODE: 6
2021-10-20 23:07:59 + exit 6

🔹 Failed: PR-CI-musl

Unknown Failed
2021-10-20 23:09:24    37 |   DenseTensorMeta(DataType type, const DDim& dims);
2021-10-20 23:09:24 | ^~~~~~~~~~~~~~~
2021-10-20 23:09:24 /paddle/paddle/pten/core/candidate/dense_tensor.h:37:3: note: candidate expects 2 arguments, 3 provided
2021-10-20 23:09:24 /paddle/paddle/pten/core/candidate/dense_tensor.h:36:3: note: candidate: 'pten::candidate::DenseTensorMeta::DenseTensorMeta()'
2021-10-20 23:09:24 36 | DenseTensorMeta() = default;
2021-10-20 23:09:24 | ^~~~~~~~~~~~~~~
2021-10-20 23:09:24 /paddle/paddle/pten/core/candidate/dense_tensor.h:36:3: note: candidate expects 0 arguments, 3 provided
2021-10-20 23:09:24 /paddle/paddle/pten/core/candidate/dense_tensor.h:32:8: note: candidate: 'pten::candidate::DenseTensorMeta::DenseTensorMeta(const pten::candidate::DenseTensorMeta&)'
2021-10-20 23:09:24 32 | struct DenseTensorMeta {
2021-10-20 23:09:24 | ^~~~~~~~~~~~~~~
2021-10-20 23:09:24 /paddle/paddle/pten/core/candidate/dense_tensor.h:32:8: note: candidate expects 1 argument, 3 provided
2021-10-20 23:09:24 /paddle/paddle/pten/core/candidate/dense_tensor.h:32:8: note: candidate: 'pten::candidate::DenseTensorMeta::DenseTensorMeta(pten::candidate::DenseTensorMeta&&)'
2021-10-20 23:09:24 /paddle/paddle/pten/core/candidate/dense_tensor.h:32:8: note: candidate expects 1 argument, 3 provided
2021-10-20 23:09:24 make[2]: *** [paddle/pten/hapi/lib/utils/CMakeFiles/pten_hapi_utils.dir/build.make:89: paddle/pten/hapi/lib/utils/CMakeFiles/pten_hapi_utils.dir/tensor_utils.cc.o] Error 1
2021-10-20 23:09:24 make[1]: *** [CMakeFiles/Makefile2:1468: paddle/pten/hapi/lib/utils/CMakeFiles/pten_hapi_utils.dir/all] Error 2
2021-10-20 23:09:24 make[1]: *** Waiting for unfinished jobs....
2021-10-20 23:10:13 [ 15%] Linking CXX static library libmath_function.a
2021-10-20 23:10:13 [ 15%] Built target math_function
2021-10-20 23:10:13 make: *** [Makefile:130: all] Error 2

🔹 Failed: PR-CI-ROCM-Compile

Unknown Failed
2021-10-20 23:12:32 ccache hit rate: 86.58%
2021-10-20 23:12:32 + '[' 2 '!=' 0 ']'
2021-10-20 23:12:32 + exit 7
2021-10-20 23:12:32 + EXCODE=7
2021-10-20 23:12:32 + export current_dir=/paddle
2021-10-20 23:12:32 + current_dir=/paddle
2021-10-20 23:12:32 + set +x
2021-10-20 23:12:33 + SOURCE=/paddle/build/coverage-diff
2021-10-20 23:12:33 + [[ -d /paddle/build/coverage-diff ]]
2021-10-20 23:12:33 + [[ -f /paddle/build/coverage-diff ]]
2021-10-20 23:12:33 + echo 'No such file or directory: /paddle/build/coverage-diff'
2021-10-20 23:12:33 + exit 0
2021-10-20 23:12:33 No such file or directory: /paddle/build/coverage-diff
2021-10-20 23:12:33 report uploaded
2021-10-20 23:12:33 ===================================================================
2021-10-20 23:12:33 c++-coverage
2021-10-20 23:12:33 https://xly.bce.baidu.com/ipipe/ipipe-report/report/8498390/c++-coverage/
2021-10-20 23:12:33 ===================================================================
2021-10-20 23:12:33 Sorry, build failed.

🔹 Failed: PR-CI-Coverage

Unknown Failed
2021-10-20 23:12:42 Makefile:140: recipe for target 'all' failed
2021-10-20 23:12:42 make: *** [all] Error 2
2021-10-20 23:12:42 + build_error=2
2021-10-20 23:12:42 + collect_ccache_hits
2021-10-20 23:12:42 ++ ccache -s
2021-10-20 23:12:42 ++ grep 'cache hit rate'
2021-10-20 23:12:42 ++ awk '{print $4}'
2021-10-20 23:12:42 + rate=95.16
2021-10-20 23:12:42 + echo 'ccache hit rate: 95.16%'
2021-10-20 23:12:42 ccache hit rate: 95.16%
2021-10-20 23:12:42 + echo 'ipipe_log_param_Ccache_Hit_Rate: 95.16%'
2021-10-20 23:12:42 + '[' 2 '!=' 0 ']'
2021-10-20 23:12:42 + exit 7
2021-10-20 23:12:42 + EXCODE=7
2021-10-20 23:12:42 + '[' 7 -eq 0 ']'
2021-10-20 23:12:42 + set +x
2021-10-20 23:12:42 Sorry, build failed.
2021-10-20 23:12:42 + exit 7
2021-10-20 23:12:42 {build code state=7}

🔹 Failed: PR-CI-Kunlun

Unknown Failed
2021-10-20 23:12:21 [ 22%] Linking CXX static library libdevice_worker.a
2021-10-20 23:12:21 [ 22%] Linking CXX static library libnan_inf_utils.a
2021-10-20 23:12:21 [ 22%] Built target device_worker
2021-10-20 23:12:21 [ 22%] Built target nan_inf_utils
2021-10-20 23:13:09 [ 22%] Linking CXX static library libmath_function.a
2021-10-20 23:13:09 [ 22%] Built target math_function
2021-10-20 23:13:09 Makefile:140: recipe for target 'all' failed
2021-10-20 23:13:09 make: *** [all] Error 2
2021-10-20 23:13:09 + build_error=2
2021-10-20 23:13:09 + collect_ccache_hits
2021-10-20 23:13:09 ++ ccache -s
2021-10-20 23:13:09 ++ grep 'cache hit rate'
2021-10-20 23:13:09 ++ awk '{print $4}'
2021-10-20 23:13:09 + rate=0.00
2021-10-20 23:13:09 + echo 'ccache hit rate: 0.00%'
2021-10-20 23:13:09 ccache hit rate: 0.00%
2021-10-20 23:13:09 + echo 'ipipe_log_param_Ccache_Hit_Rate: 0.00%'
2021-10-20 23:13:09 + '[' 2 '!=' 0 ']'
2021-10-20 23:13:09 + exit 7

🔹 Failed: PR-CI-GpuPS

Unknown Failed
2021-10-20 23:13:24 ++ awk '{print $4}'
2021-10-20 23:13:24 + rate=55.14
2021-10-20 23:13:24 + echo 'ccache hit rate: 55.14%'
2021-10-20 23:13:24 ccache hit rate: 55.14%
2021-10-20 23:13:24 + echo 'ipipe_log_param_Ccache_Hit_Rate: 55.14%'
2021-10-20 23:13:24 + '[' 2 '!=' 0 ']'
2021-10-20 23:13:24 + exit 7
2021-10-20 23:13:24 + EXCODE=7
2021-10-20 23:13:24 + '[' 7 -eq 0 ']'
2021-10-20 23:13:24 + [[ 7 -eq 0 ]]
2021-10-20 23:13:24 + [[ 7 -eq 4 ]]
2021-10-20 23:13:24 + [[ 7 -eq 5 ]]
2021-10-20 23:13:24 + [[ 7 -eq 6 ]]
2021-10-20 23:13:24 + [[ 7 -eq 7 ]]
2021-10-20 23:13:24 + echo 'Sorry, build failed.'
2021-10-20 23:13:24 Sorry, build failed.
2021-10-20 23:13:24 + set -x
2021-10-20 23:13:24 + exit 7
2021-10-20 23:13:24 {build code state=7}

🔹 Failed: PR-CI-Inference

Unknown Failed
2021-10-20 23:13:43 ++ awk '{print $4}'
2021-10-20 23:13:43 + rate=81.47
2021-10-20 23:13:43 + echo 'ccache hit rate: 81.47%'
2021-10-20 23:13:43 ccache hit rate: 81.47%
2021-10-20 23:13:43 + echo 'ipipe_log_param_Ccache_Hit_Rate: 81.47%'
2021-10-20 23:13:43 + '[' 2 '!=' 0 ']'
2021-10-20 23:13:43 + exit 7
2021-10-20 23:13:43 + EXCODE=7
2021-10-20 23:13:43 + '[' 7 -eq 0 ']'
2021-10-20 23:13:43 + [[ 7 -eq 0 ]]
2021-10-20 23:13:43 + [[ 7 -eq 4 ]]
2021-10-20 23:13:43 + [[ 7 -eq 5 ]]
2021-10-20 23:13:43 + [[ 7 -eq 6 ]]
2021-10-20 23:13:43 + [[ 7 -eq 7 ]]
2021-10-20 23:13:43 + echo 'Sorry, build failed.'
2021-10-20 23:13:43 Sorry, build failed.
2021-10-20 23:13:43 + set -x
2021-10-20 23:13:43 + exit 7
2021-10-20 23:13:43 {build code state=7}

🔹 Failed: PR-CI-Mac-Python3

build_failed
2021-10-20 23:15:10 6 warnings generated.
2021-10-20 23:15:10 [ 36%] Linking CXX static library libmath_function.a
2021-10-20 23:15:10 [ 36%] Built target math_function
2021-10-20 23:15:10 make: *** [all] Error 2
2021-10-20 23:15:10 + build_error=2
2021-10-20 23:15:10 + collect_ccache_hits
2021-10-20 23:15:10 ++ ccache -s
2021-10-20 23:15:10 ++ grep 'cache hit rate'
2021-10-20 23:15:10 ++ awk '{print $4}'
2021-10-20 23:15:10 + rate=89.61
2021-10-20 23:15:10 + echo 'ccache hit rate: 89.61%'
2021-10-20 23:15:10 ccache hit rate: 89.61%
2021-10-20 23:15:10 + echo 'ipipe_log_param_Ccache_Hit_Rate: 89.61%'
2021-10-20 23:15:10 + '[' 2 '!=' 0 ']'
2021-10-20 23:15:10 + exit 7
2021-10-20 23:15:10 EXCODE: 7
2021-10-20 23:15:10 ipipe_log_param_EXCODE: 7
2021-10-20 23:15:10 Sorry, build failed.
2021-10-20 23:15:10 + exit 7

🔹 Failed: PR-CI-Model-benchmark

Unknown Failed
2021-10-20 23:16:05 + '[' 2 '!=' 0 ']'
2021-10-20 23:16:05 + exit 7
2021-10-20 23:16:05 + '[' 7 -ne 0 ']'
2021-10-20 23:16:05 + echo 'build paddle failed.'
2021-10-20 23:16:05 build paddle failed.
2021-10-20 23:16:05 + exit 1
2021-10-20 23:16:05 + EXCODE=1
2021-10-20 23:16:05 + '[' OFF == ON ']'
2021-10-20 23:16:05 + '[' 1 -eq 0 ']'
2021-10-20 23:16:05 + [[ 1 -eq 0 ]]
2021-10-20 23:16:05 + [[ 1 -eq 4 ]]
2021-10-20 23:16:05 + [[ 1 -eq 5 ]]
2021-10-20 23:16:05 + [[ 1 -eq 6 ]]
2021-10-20 23:16:05 + [[ 1 -eq 7 ]]
2021-10-20 23:16:05 + [[ 1 -eq 8 ]]
2021-10-20 23:16:05 + [[ 1 -eq 9 ]]
2021-10-20 23:16:05 + set -x
2021-10-20 23:16:05 + exit 1
2021-10-20 23:16:05 {build code state=1}

🔹 Failed: PR-CI-Py3

Unknown Failed
2021-10-20 23:16:40 ++ awk '{print $4}'
2021-10-20 23:16:40 + rate=94.96
2021-10-20 23:16:40 + echo 'ccache hit rate: 94.96%'
2021-10-20 23:16:40 ccache hit rate: 94.96%
2021-10-20 23:16:40 + echo 'ipipe_log_param_Ccache_Hit_Rate: 94.96%'
2021-10-20 23:16:40 + '[' 2 '!=' 0 ']'
2021-10-20 23:16:40 + exit 7
2021-10-20 23:16:40 + EXCODE=7
2021-10-20 23:16:40 + '[' 7 -eq 0 ']'
2021-10-20 23:16:40 + [[ 7 -eq 0 ]]
2021-10-20 23:16:40 + [[ 7 -eq 4 ]]
2021-10-20 23:16:40 + [[ 7 -eq 5 ]]
2021-10-20 23:16:40 + [[ 7 -eq 6 ]]
2021-10-20 23:16:40 + [[ 7 -eq 7 ]]
2021-10-20 23:16:40 + echo 'Sorry, build failed.'
2021-10-20 23:16:40 Sorry, build failed.
2021-10-20 23:16:40 + set -x
2021-10-20 23:16:40 + exit 7
2021-10-20 23:16:40 {build code state=7}

🔹 Failed: PR-CI-Static-Check

build_failed
2021-10-20 23:16:36 CMakeFiles/Makefile2:5254: recipe for target 'paddle/pten/hapi/lib/utils/CMakeFiles/pten_hapi_utils.dir/all' failed
2021-10-20 23:16:36 make[1]: *** [paddle/pten/hapi/lib/utils/CMakeFiles/pten_hapi_utils.dir/all] Error 2
2021-10-20 23:16:36 make[1]: *** Waiting for unfinished jobs....
2021-10-20 23:19:26 [ 16%] Linking CXX static library libmath_function.a
2021-10-20 23:19:26 [ 16%] Built target math_function
2021-10-20 23:19:26 Makefile:129: recipe for target 'all' failed
2021-10-20 23:19:26 make: *** [all] Error 2
2021-10-20 23:19:26 ccache hit rate: 83.33%
2021-10-20 23:19:26 + EXCODE=7
2021-10-20 23:19:26 + echo 'EXCODE: 7'
2021-10-20 23:19:26 EXCODE: 7
2021-10-20 23:19:26 + echo 'ipipe_log_param_EXCODE: 7'
2021-10-20 23:19:26 ipipe_log_param_EXCODE: 7
2021-10-20 23:19:26 + '[' 7 -eq 0 ']'
2021-10-20 23:19:26 + set +x
2021-10-20 23:19:26 Sorry, build failed.
2021-10-20 23:19:26 + exit 7
2021-10-20 23:19:26 {build code state=7}
2021-10-20 23:19:36 kill agent BUILD_CODE_FAIL

🔹 Failed: PR-CI-OP-benchmark

build_failed
2021-10-20 23:22:19 ccache hit rate: 84.87%
2021-10-20 23:22:19 + echo 'ipipe_log_param_Ccache_Hit_Rate: 84.87%'
2021-10-20 23:22:19 + '[' 2 '!=' 0 ']'
2021-10-20 23:22:19 + exit 7
2021-10-20 23:22:19 + '[' 7 -ne 0 ']'
2021-10-20 23:22:19 + LOG '[FATAL] compile fail.'
2021-10-20 23:22:19 + echo '[tools/test_ci_op_benchmark.sh:175] [FATAL] compile fail.'
2021-10-20 23:22:19 [tools/test_ci_op_benchmark.sh:175] [FATAL] compile fail.
2021-10-20 23:22:19 + exit 7
2021-10-20 23:22:19 + EXCODE=7
2021-10-20 23:22:19 + echo 'EXCODE: 7'
2021-10-20 23:22:19 EXCODE: 7
2021-10-20 23:22:19 + echo 'ipipe_log_param_EXCODE: 7'
2021-10-20 23:22:19 ipipe_log_param_EXCODE: 7
2021-10-20 23:22:19 + '[' 7 -eq 0 ']'
2021-10-20 23:22:19 + set +x
2021-10-20 23:22:19 Sorry, build failed.
2021-10-20 23:22:19 + exit 7
2021-10-20 23:22:19 {build code state=7}

🔹 Failed: PR-CI-Windows-OPENBLAS

build_failed
2021-10-20 23:27:17          C:\home\workspace\Paddle\paddle/pten/hapi/lib/utils/tensor_utils.h(44): error C2039: 'TransToPtDataLayout': is not a member of 'pten' (compiling source file C:\home\workspace\Paddle\paddle\pten\hapi\lib\utils\tensor_utils.cc) [C:\home\workspace\Paddle\build\paddle\pten\hapi\lib\utils\pten_hapi_utils.vcxproj]
2021-10-20 23:27:17 C:\home\workspace\Paddle\paddle/pten/hapi/lib/utils/tensor_utils.h(44): error C3861: 'TransToPtDataLayout': identifier not found (compiling source file C:\home\workspace\Paddle\paddle\pten\hapi\lib\utils\tensor_utils.cc) [C:\home\workspace\Paddle\build\paddle\pten\hapi\lib\utils\pten_hapi_utils.vcxproj]
2021-10-20 23:27:17 C:\home\workspace\Paddle\paddle/pten/hapi/lib/utils/tensor_utils.h(52): error C2039: 'TransToPtDataType': is not a member of 'pten' (compiling source file C:\home\workspace\Paddle\paddle\pten\hapi\lib\utils\tensor_utils.cc) [C:\home\workspace\Paddle\build\paddle\pten\hapi\lib\utils\pten_hapi_utils.vcxproj]
2021-10-20 23:27:17 C:\home\workspace\Paddle\paddle/pten/hapi/lib/utils/tensor_utils.h(52): error C3861: 'TransToPtDataType': identifier not found (compiling source file C:\home\workspace\Paddle\paddle\pten\hapi\lib\utils\tensor_utils.cc) [C:\home\workspace\Paddle\build\paddle\pten\hapi\lib\utils\pten_hapi_utils.vcxproj]
2021-10-20 23:27:17 C:\home\workspace\Paddle\paddle/pten/hapi/lib/utils/tensor_utils.h(54): error C2039: 'TransToPtDataLayout': is not a member of 'pten' (compiling source file C:\home\workspace\Paddle\paddle\pten\hapi\lib\utils\tensor_utils.cc) [C:\home\workspace\Paddle\build\paddle\pten\hapi\lib\utils\pten_hapi_utils.vcxproj]
2021-10-20 23:27:17 C:\home\workspace\Paddle\paddle/pten/hapi/lib/utils/tensor_utils.h(54): error C3861: 'TransToPtDataLayout': identifier not found (compiling source file C:\home\workspace\Paddle\paddle\pten\hapi\lib\utils\tensor_utils.cc) [C:\home\workspace\Paddle\build\paddle\pten\hapi\lib\utils\pten_hapi_utils.vcxproj]
2021-10-20 23:27:17 727 Warning(s)
2021-10-20 23:27:17 8 Error(s)
2021-10-20 23:27:17 Time Elapsed 00:18:49.62
2021-10-20 23:27:17 7
2021-10-20 23:27:17 Build Paddle failed, will exit
2021-10-20 23:27:17 EXCODE: 7

🔹 Failed: PR-CI-NPU

Unknown Failed
2021-10-21 00:51:49 + set +x
2021-10-21 00:51:49 + SOURCE=/paddle/build/coverage-diff
2021-10-21 00:51:49 + [[ -d /paddle/build/coverage-diff ]]
2021-10-21 00:51:49 + [[ -f /paddle/build/coverage-diff ]]
2021-10-21 00:51:49 No such file or directory: /paddle/build/coverage-diff
2021-10-21 00:51:49 + echo 'No such file or directory: /paddle/build/coverage-diff'
2021-10-21 00:51:49 + exit 0
2021-10-21 00:51:49 report uploaded
2021-10-21 00:51:49 ===================================================================
2021-10-21 00:51:49 c++-coverage
2021-10-21 00:51:49 https://xly.bce.baidu.com/ipipe/ipipe-report/report/8498399/c++-coverage/
2021-10-21 00:51:49 ===================================================================
2021-10-21 00:51:49 + [[ 7 -eq 0 ]]
2021-10-21 00:51:49 + [[ 7 -eq 4 ]]
2021-10-21 00:51:49 + [[ 7 -eq 6 ]]
2021-10-21 00:51:49 + [[ 7 -eq 7 ]]
2021-10-21 00:51:49 + echo 'Sorry, build failed.'
2021-10-21 00:51:49 Sorry, build failed.
2021-10-21 00:51:49 + exit 7

Please sign in to comment.