You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by lx...@apache.org on 2017/07/07 15:58:56 UTC
[43/50] [abbrv] incubator-mxnet-test git commit: Fix for WarpCTC
conflict (#6905)
Fix for WarpCTC conflict (#6905)
* fix for memcpy bug
* moved namespace
Project: http://git-wip-us.apache.org/repos/asf/incubator-mxnet-test/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mxnet-test/commit/e09cc7c6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mxnet-test/tree/e09cc7c6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mxnet-test/diff/e09cc7c6
Branch: refs/heads/master
Commit: e09cc7c6830f474b7afeeff5f4baba38613493f9
Parents: d7852e8
Author: Sebastian Bodenstein <se...@gmail.com>
Authored: Wed Jul 5 18:13:43 2017 +0200
Committer: Eric Junyuan Xie <pi...@users.noreply.github.com>
Committed: Wed Jul 5 09:13:43 2017 -0700
----------------------------------------------------------------------
src/operator/contrib/ctc_include/detail/cpu_ctc.h | 4 ++++
src/operator/contrib/ctc_include/detail/gpu_ctc.h | 4 ++++
src/operator/contrib/ctc_loss.cc | 2 +-
src/operator/contrib/ctc_loss.cu | 2 +-
4 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mxnet-test/blob/e09cc7c6/src/operator/contrib/ctc_include/detail/cpu_ctc.h
----------------------------------------------------------------------
diff --git a/src/operator/contrib/ctc_include/detail/cpu_ctc.h b/src/operator/contrib/ctc_include/detail/cpu_ctc.h
index 68d74bb..f31ef62 100644
--- a/src/operator/contrib/ctc_include/detail/cpu_ctc.h
+++ b/src/operator/contrib/ctc_include/detail/cpu_ctc.h
@@ -10,6 +10,8 @@
#include "ctc_helper.h"
+namespace mxnet_warpctc {
+
template<typename ProbT>
class CpuCTC {
public:
@@ -484,3 +486,5 @@ ctcStatus_t CpuCTC<ProbT>::score_forward(const ProbT* const activations,
return CTC_STATUS_SUCCESS;
}
+
+} // mxnet_warpctc
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-mxnet-test/blob/e09cc7c6/src/operator/contrib/ctc_include/detail/gpu_ctc.h
----------------------------------------------------------------------
diff --git a/src/operator/contrib/ctc_include/detail/gpu_ctc.h b/src/operator/contrib/ctc_include/detail/gpu_ctc.h
index 30fa2cf..ef71f3c 100644
--- a/src/operator/contrib/ctc_include/detail/gpu_ctc.h
+++ b/src/operator/contrib/ctc_include/detail/gpu_ctc.h
@@ -1,8 +1,11 @@
#pragma once
+
#include "ctc_helper.h"
#include "gpu_ctc_kernels.h"
+namespace mxnet_warpctc {
+
template <typename ProbT>
class GpuCTC {
public:
@@ -481,3 +484,4 @@ GpuCTC<ProbT>::score_forward(const ProbT* const activations,
label_lengths, input_lengths, true, false);
}
+} // mxnet_warpctc
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-mxnet-test/blob/e09cc7c6/src/operator/contrib/ctc_loss.cc
----------------------------------------------------------------------
diff --git a/src/operator/contrib/ctc_loss.cc b/src/operator/contrib/ctc_loss.cc
index 918af0e..c3f3fe1 100644
--- a/src/operator/contrib/ctc_loss.cc
+++ b/src/operator/contrib/ctc_loss.cc
@@ -18,7 +18,7 @@ ctcStatus_t compute_ctc_cost(const Tensor<cpu, 3, DType> activations,
int minibatch = static_cast<int>(activations.size(1));
int alphabet_size = static_cast<int>(activations.size(2));
int blank_label = 0;
- CpuCTC<DType> ctc(alphabet_size, minibatch, workspace, blank_label);
+ mxnet_warpctc::CpuCTC<DType> ctc(alphabet_size, minibatch, workspace, blank_label);
if (train)
return ctc.cost_and_grad(activations.dptr_, grads, costs, labels,
label_lengths, input_lengths);
http://git-wip-us.apache.org/repos/asf/incubator-mxnet-test/blob/e09cc7c6/src/operator/contrib/ctc_loss.cu
----------------------------------------------------------------------
diff --git a/src/operator/contrib/ctc_loss.cu b/src/operator/contrib/ctc_loss.cu
index 6ef8b4e..ed80eb7 100644
--- a/src/operator/contrib/ctc_loss.cu
+++ b/src/operator/contrib/ctc_loss.cu
@@ -18,7 +18,7 @@ ctcStatus_t compute_ctc_cost(const Tensor<gpu, 3, DType> activations,
int minibatch = static_cast<int>(activations.size(1));
int alphabet_size = static_cast<int>(activations.size(2));
int blank_label = 0;
- GpuCTC<DType> ctc(alphabet_size, minibatch, workspace,
+ mxnet_warpctc::GpuCTC<DType> ctc(alphabet_size, minibatch, workspace,
activations.stream_->stream_, blank_label);
if (train)
return ctc.cost_and_grad(activations.dptr_, grads, costs, labels,