<jupyter_start><jupyter_text><jupyter_code>### NOTE THIS WORKS AS PYTHON, IT ONLY WORKS WHEN THE RUNTIME COMPLAINS ABOUT JULIA RUNTIME, SO IT REVERTS TO PYTHON. AFTER JULIA IS INSTALLED, CHANGE TO JULIA RUNTIME

!curl -sSL "https://julialang-s3.julialang.org/bin/linux/x64/1.5/julia-1.5.0-linux-x86_64.tar.gz" -o julia.tar.gz
!tar -xzf julia.tar.gz -C /usr --strip-components 1
!rm -rf julia.tar.gz*
!julia -e 'using Pkg; pkg"add IJulia; precompile"'
!julia -e 'using Pkg; Pkg.add([ "CUDA", "Flux","Zygote","Profile", "TensorBoardLogger", "Logging",\
    "Random", "DataStructures", "Transformers","Statistics", "BenchmarkTools"\
    ]);' ###Pkg.precompile()'
!echo "DONE"
[1,2,3]
using CUDA
using BenchmarkTools

M = rand(2048, 2048)
@benchmark M^2

if ENV["COLAB_GPU"] == "1"

    M_gpu = cu(M)
    @benchmark CUDA.@sync M_gpu^2
else
    println("No GPU found.")
end
CUDA.memory_status()
GC.gc(true)
CUDA.memory_status()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16701680672268907, 'fraction_numerical': 0.028361344537815126, 'mean_word_length': 4.740963855421687, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '512002', 'license': 'MIT', 'n_tokens_mistral': 436, 'n_tokens_neox': 406, 'n_words': 93, 'path': 'startjulia1_5.ipynb', 'repo_name': 'daryoush/CudaAndFluxExperiments', 'size': '952'}