 
         template<typename T>
         int logdetFunctor_(nd4j::LaunchContext *context, NDArray *input, NDArray *output) {
-            defaultContext = context;
             NDArray::prepareSpecialUse({output}, {input});
             auto n2 = input->sizeAt(-1) * input->sizeAt(-2);
             auto stream = context->getCudaStream();

        }

        int logdetFunctor(nd4j::LaunchContext *context, NDArray *input, NDArray *output) {
            defaultContext = context;
            BUILD_SINGLE_SELECTOR(output->dataType(), logdetFunctor_, (context, input, output), FLOAT_NATIVE);
        }



//    template <typename T>
        int cholesky_(LaunchContext *context, NDArray *input, NDArray *output, bool inplace) {
            NDArray::prepareSpecialUse({output}, {input});
            if (input->dataType() == DataType::DOUBLE)
                cholesky__<double>(context, input, output, inplace);
