 namespace platforms {
 
 
-
-    template<typename Op, typename ...Args>
-    void callCudnnIfNoErr(cudnnStatus_t &err, Op op, Args&&... args){
-        if(err==CUDNN_STATUS_SUCCESS){
-            err = op(std::forward<Args>(args)...);
-            if(err){
-                nd4j_printf("Cudnn error code %s\n",cudnnGetErrorString(err));
-            }
-        }
-    }
-
-    template <typename T>
-    const T* bufferInHost( const NDArray &array)  {
-        array.syncToHost();
-        return reinterpret_cast<const T*>(array.buffer());
-    }
 
     std::vector<int> getConcatTargets(const NDArray &targetLabels, const NDArray &targetLabelLengths){
                 //concatenate target labels

        auto logitInputLengths = INPUT_VARIABLE(3);
        auto outputGradients = OUTPUT_VARIABLE(0);
        auto context = block.launchContext();
        //in Cudnn Batch is in the middle dimension
        logitInput->permutei({1,0,2});
        outputGradients->permutei({1,0,2});

        NDArray::registerSpecialUse({&ctcLosses, &grads}, {&probs});

        cudaFree(tempWorkSpace);
        return err;
     }

