SPPU Computer Engineering 2019 Pattern Final Year-Sem 2 Lab Assignments. (If this repo helped you, do star it! :)
bash
Copy code
sudo apt update
Install pip: pip is a package management system used to install and manage software packages written in Python. If you don't have it installed, you can install it with:
bash
Copy code
sudo apt install python3-pip
bash
Copy code
sudo -H pip3 install jupyter
Run Jupyter Notebook: After installation, you can start Jupyter Notebook by running the following command in your terminal:
bash
Copy code
jupyter notebook
sudo apt install python3
pip install -r requirements.txt
sudo apt install build-essential
(https://colab.research.google.com/drive/1vQefPvH2Ycq5FaDDwqTX0iQppDQROD_i?usp=sharing)
- Go to Google Collab
- Create a new Notebook(.ipynb file).
- Click on Runtime and change runtime type to GPU.
- Now run
!pip install git+https://github.com/afnan47/cuda.git
in a cell. - On a new cell run
%load_ext nvcc_plugin
- Test the following code
%%cu
#include <iostream>
int main(){
std::cout << "Hello World\n";
return 0;
}
- Remember to add
%%cu
before writing the C++ code for every CUDA program. CUDA is now set.