提交 33edb112 authored 作者: notoraptor's avatar notoraptor

Allow debug printing for runtime algorithms in any case.

上级 ade0510d
...@@ -331,15 +331,7 @@ APPLY_SPECIFIC(conv_fwd)(PyGpuArrayObject *input, PyGpuArrayObject *kerns, ...@@ -331,15 +331,7 @@ APPLY_SPECIFIC(conv_fwd)(PyGpuArrayObject *input, PyGpuArrayObject *kerns,
} }
} }
if (params->choose_algo && !reuse_algo) { if (params->choose_algo) {
// save for next time/cache
prev_algo.algo = algo;
prev_algo.wsSize = worksize;
prev_algo.mathType = mathtype;
// Add to the cache if we choose on shape change, or first time if
// we choose once.
if (!use_cached)
dnn_conv_update_cache(hashkey, prev_algo);
#ifdef DEBUG #ifdef DEBUG
if (0 != theano_enum_to_string_cudnnConvolutionFwdAlgo_t(algo, algorithm_name)) { if (0 != theano_enum_to_string_cudnnConvolutionFwdAlgo_t(algo, algorithm_name)) {
...@@ -357,9 +349,21 @@ APPLY_SPECIFIC(conv_fwd)(PyGpuArrayObject *input, PyGpuArrayObject *kerns, ...@@ -357,9 +349,21 @@ APPLY_SPECIFIC(conv_fwd)(PyGpuArrayObject *input, PyGpuArrayObject *kerns,
); );
#endif #endif
if (!reuse_algo) {
// save for next time/cache
prev_algo.algo = algo;
prev_algo.wsSize = worksize;
prev_algo.mathType = mathtype;
// Add to the cache if we choose on shape change, or first time if
// we choose once.
if (!use_cached)
dnn_conv_update_cache(hashkey, prev_algo);
if (params->choose_once) if (params->choose_once)
reuse_algo = 1; reuse_algo = 1;
} // params->choose_algo && !reuse_algo }
} // params->choose_algo
{ {
gpudata *workspace = 0; gpudata *workspace = 0;
......
...@@ -288,15 +288,7 @@ APPLY_SPECIFIC(conv_gi)(PyGpuArrayObject *kerns, PyGpuArrayObject *output, ...@@ -288,15 +288,7 @@ APPLY_SPECIFIC(conv_gi)(PyGpuArrayObject *kerns, PyGpuArrayObject *output,
} }
} // !(reuse_algo || use_cached || params->choose_time) } // !(reuse_algo || use_cached || params->choose_time)
if (params->choose_algo && !reuse_algo) { if (params->choose_algo) {
// save for next time/cache
prev_algo.algo = algo;
prev_algo.wsSize = worksize;
prev_algo.mathType = mathtype;
// Add to the cache
if (!use_cached)
dnn_conv_update_cache(hashkey, prev_algo);
#ifdef DEBUG #ifdef DEBUG
if (0 != theano_enum_to_string_cudnnConvolutionBwdDataAlgo_t(algo, algorithm_name)) { if (0 != theano_enum_to_string_cudnnConvolutionBwdDataAlgo_t(algo, algorithm_name)) {
...@@ -313,9 +305,22 @@ APPLY_SPECIFIC(conv_gi)(PyGpuArrayObject *kerns, PyGpuArrayObject *output, ...@@ -313,9 +305,22 @@ APPLY_SPECIFIC(conv_gi)(PyGpuArrayObject *kerns, PyGpuArrayObject *output,
hashkey.c_str() hashkey.c_str()
); );
#endif #endif
if (!reuse_algo) {
// save for next time/cache
prev_algo.algo = algo;
prev_algo.wsSize = worksize;
prev_algo.mathType = mathtype;
// Add to the cache
if (!use_cached)
dnn_conv_update_cache(hashkey, prev_algo);
if (params->choose_once) if (params->choose_once)
reuse_algo = 1; reuse_algo = 1;
} // params->choose_algo && !reuse_algo }
} // params->choose_algo
gpudata *workspace = 0; gpudata *workspace = 0;
if (worksize != 0) { if (worksize != 0) {
......
...@@ -278,15 +278,7 @@ APPLY_SPECIFIC(conv_gw)(PyGpuArrayObject *input, PyGpuArrayObject *output, ...@@ -278,15 +278,7 @@ APPLY_SPECIFIC(conv_gw)(PyGpuArrayObject *input, PyGpuArrayObject *output,
} }
} }
if (params->choose_algo && !reuse_algo) { if (params->choose_algo) {
// save for next time/cache
prev_algo.algo = algo;
prev_algo.wsSize = worksize;
prev_algo.mathType = mathtype;
// Add to the cache if we choose on shape change, or first time if
// we choose once.
if (!use_cached)
dnn_conv_update_cache(hashkey, prev_algo);
#ifdef DEBUG #ifdef DEBUG
if (0 != theano_enum_to_string_cudnnConvolutionBwdFilterAlgo_t(algo, algorithm_name)) { if (0 != theano_enum_to_string_cudnnConvolutionBwdFilterAlgo_t(algo, algorithm_name)) {
...@@ -304,9 +296,21 @@ APPLY_SPECIFIC(conv_gw)(PyGpuArrayObject *input, PyGpuArrayObject *output, ...@@ -304,9 +296,21 @@ APPLY_SPECIFIC(conv_gw)(PyGpuArrayObject *input, PyGpuArrayObject *output,
); );
#endif #endif
if (!reuse_algo) {
// save for next time/cache
prev_algo.algo = algo;
prev_algo.wsSize = worksize;
prev_algo.mathType = mathtype;
// Add to the cache if we choose on shape change, or first time if
// we choose once.
if (!use_cached)
dnn_conv_update_cache(hashkey, prev_algo);
if (params->choose_once) if (params->choose_once)
reuse_algo = 1; reuse_algo = 1;
} // params->choose_algo && !reuse_algo }
} // params->choose_algo
gpudata *workspace = 0; gpudata *workspace = 0;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论