代码拉取完成,页面将自动刷新
同步操作将从 openEuler-RISC-V/tensorflow 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From ace0c15a22f7f054abcc1f53eabbcb0a1239a9e2 Mon Sep 17 00:00:00 2001
From: Mihai Maruseac <mihaimaruseac@google.com>
Date: Tue, 24 Nov 2020 11:40:42 -0800
Subject: [PATCH] Default initialize fixed point Eigen types.
In certain cases, tensors are filled with default values of the type. But, for these fixed point types, these values were uninitialized. Thus, we would have uninitialized memory access bugs, some of which were caught by MSAN.
PiperOrigin-RevId: 344101137
Change-Id: I14555fda74dca3b5f1582da9008901937e3f14e2
---
.../Eigen/CXX11/src/FixedPoint/FixedPointTypes.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/FixedPointTypes.h b/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/FixedPointTypes.h
index ff359cedced96..fd35360da2820 100644
--- a/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/FixedPointTypes.h
+++ b/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/FixedPointTypes.h
@@ -49,7 +49,7 @@ struct scalar_product_traits<QInt32, double> {
// the compiler from silently type cast the mantissa into a bigger or a smaller
// representation.
struct QInt8 {
- QInt8() {}
+ QInt8() : value(0) {}
QInt8(const int8_t v) : value(v) {}
QInt8(const QInt32 v);
@@ -59,7 +59,7 @@ struct QInt8 {
};
struct QUInt8 {
- QUInt8() {}
+ QUInt8() : value(0) {}
QUInt8(const uint8_t v) : value(v) {}
QUInt8(const QInt32 v);
@@ -69,7 +69,7 @@ struct QUInt8 {
};
struct QInt16 {
- QInt16() {}
+ QInt16() : value(0) {}
QInt16(const int16_t v) : value(v) {}
QInt16(const QInt32 v);
operator int() const { return static_cast<int>(value); }
@@ -78,7 +78,7 @@ struct QInt16 {
};
struct QUInt16 {
- QUInt16() {}
+ QUInt16() : value(0) {}
QUInt16(const uint16_t v) : value(v) {}
QUInt16(const QInt32 v);
operator int() const { return static_cast<int>(value); }
@@ -87,7 +87,7 @@ struct QUInt16 {
};
struct QInt32 {
- QInt32() {}
+ QInt32() : value(0) {}
QInt32(const int8_t v) : value(v) {}
QInt32(const int32_t v) : value(v) {}
QInt32(const uint32_t v) : value(static_cast<int32_t>(v)) {}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。