You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/02/01 03:29:54 UTC
[GitHub] marcoabreu closed pull request #9654: Fix OSX build, std::max template resolution with different types.
marcoabreu closed pull request #9654: Fix OSX build, std::max template resolution with different types.
URL: https://github.com/apache/incubator-mxnet/pull/9654
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/include/mxnet/ndarray.h b/include/mxnet/ndarray.h
index 43bc205944..23c24766a0 100644
--- a/include/mxnet/ndarray.h
+++ b/include/mxnet/ndarray.h
@@ -834,7 +834,7 @@ class NDArray {
void CheckAndAlloc(uint64_t dbytes) {
CHECK_EQ(kDefaultStorage, storage_type)
<< "CheckAndAlloc(dbytes) is only intended for kDefaultStorage";
- dbytes = std::max(dbytes, shandle.size);
+ dbytes = std::max(dbytes, static_cast<uint64_t>(shandle.size));
if (delay_alloc) {
shandle = Storage::Get()->Alloc(dbytes, shandle.ctx);
#if MXNET_USE_MKLDNN == 1
diff --git a/tests/cpp/operator/fully_conn_perf.cc b/tests/cpp/operator/fully_conn_perf.cc
index 829c20385a..0ea4082a3f 100644
--- a/tests/cpp/operator/fully_conn_perf.cc
+++ b/tests/cpp/operator/fully_conn_perf.cc
@@ -26,6 +26,7 @@
#include <dmlc/logging.h>
#include <mxnet/tensor_blob.h>
+#include <nnvm/tuple.h>
#include "../../src/operator/nn/fully_connected-inl.h"
#include "../include/test_op_runner.h"
#include "../include/test_core_op.h"
@@ -76,7 +77,7 @@ TEST(FULLY_CONNECTED, FullyConnectedTimingCPU) {
};
}
for (const TShape& shape : shapes) {
- TShape shape2({250, shape.ProdShape(1, shape.ndim())});
+ TShape shape2({250, static_cast<nnvm::dim_t>(shape.ProdShape(1, shape.ndim()))});
kwargs = test::op::CoreOpExecutor<float>::ArgsWithOpName(kwargs, "FullyConnected",
"_backward_FullyConnected");
runner.TimingTest("Fully connected CPU", false, false, kwargs, 2, 10,
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services