<jupyter_start><jupyter_text><jupyter_code>!wget https://developer.nvidia.com/compute/cuda/9.2/Prod/local_installers/cuda-repo-ubuntu1604-9-2-local_9.2.88-1_amd64 -O cuda-repo-ubuntu1604-9-2-local_9.2.88-1_amd64.deb
!dpkg -i cuda-repo-ubuntu1604-9-2-local_9.2.88-1_amd64.deb
!apt-key add /var/cuda-repo-9-2-local/<KEY>
!apt-get update
!apt-get install cuda-9.2
!nvcc --version<jupyter_output>nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Wed_Apr_11_23:16:29_CDT_2018
Cuda compilation tools, release 9.2, V9.2.88<jupyter_text><jupyter_code>!curl https://raw.githubusercontent.com/HeptaDecane/LP1_SEM7/main/CudaSandbox/hello_world.cu --output hello_world.cu
!nvcc hello_world.cu -o hello_world
!nvprof ./hello_world<jupyter_output>Hello World!
==2383== NVPROF is profiling process 2383, command: ./hello_world
Hello from block 2, thread 0
Hello from block 2, thread 1
Hello from block 2, thread 2
Hello from block 2, thread 3
Hello from block 2, thread 4
Hello from block 2, thread 5
Hello from block 2, thread 6
Hello from block 2, thread 7
Hello from block 3, thread 0
Hello from block 3, thread 1
Hello from block 3, thread 2
Hello from block 3, thread 3
Hello from block 3, thread 4
Hello from block 3, thread 5
Hello from block 3, thread 6
Hello from block 3, thread 7
Hello from block 0, thread 0
Hello from block 0, thread 1
Hello from block 0, thread 2
Hello from block 0, thread 3
Hello from block 0, thread 4
Hello from block 0, thread 5
Hello from block 0, thread 6
Hello from block 0, thread 7
Hello from block 1, thread 0
Hello from block 1, thread 1
Hello from block 1, thread 2
Hello from block 1, thread 3
Hello from block 1, thread 4
Hello from block 1, thread 5
Hello from block 1, thread 6
Hello from block 1, th[...]<jupyter_text><jupyter_code>!curl https://raw.githubusercontent.com/HeptaDecane/LP1_SEM7/main/CudaSandbox/vector_add.cu --output vector_add.cu
!nvcc vector_add.cu -o vector_add
!nvprof ./vector_add<jupyter_output>==4420== NVPROF is profiling process 4420, command: ./vector_add

---------------------------
__SUCCESS__
---------------------------
N                 = 1048576
Threads Per Block = 256
Blocks In Grid    = 4096
---------------------------

==4420== Profiling application: ./vector_add
==4420== Profiling result:
            Type  Time(%)      Time     Calls       Avg       Min       Max  Name
 GPU activities:   63.53%  4.2679ms         1  4.2679ms  4.2679ms  4.2679ms  [CUDA memcpy DtoH]
                   33.58%  2.2560ms         2  1.1280ms  1.1269ms  1.1291ms  [CUDA memcpy HtoD]
                    2.88%  193.54us         1  193.54us  193.54us  193.54us  add_vectors(double*, double*, double*)
      API calls:   94.85%  211.21ms         3  70.404ms  235.05us  210.68ms  cudaMalloc
                    3.58%  7.9772ms         3  2.6591ms  1.0825ms  5.5932ms  cudaMemcpy
                    1.11%  2.4701ms         3  823.37us  229.37us  1.1210ms  cudaFree
                    0.21%  471.83us [...]
{'fraction_non_alphanumeric': 0.11582109479305741, 'fraction_numerical': 0.11048064085447264, 'mean_word_length': 2.6773006134969326, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 3, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '589606', 'license': 'MIT', 'n_tokens_mistral': 1267, 'n_tokens_neox': 1051, 'n_words': 341, 'path': 'CudaSandbox/notebook.ipynb', 'repo_name': 'HeptaDecane/LP1_SEM7', 'size': '3003'}