 
         if (inputMatrix->isIdentityMatrix()) return;
 
-        auto stream = defaultContext->getCudaStream();
+        auto stream = LaunchContext::defaultContext()->getCudaStream();
 
         // invert main diagonal
         upvertKernel<T> << < 1, n, 512, *stream >> >


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

        }

        int determinant(nd4j::LaunchContext *context, NDArray *input, NDArray *output) {
            NDArray::prepareSpecialUse({output}, {input});
            BUILD_SINGLE_SELECTOR(input->dataType(), return determinant_, (context, input, output), FLOAT_NATIVE);
            NDArray::registerSpecialUse({output}, {input});
