Git Product home page Git Product logo

cuda_c-cpp_into_colab's Introduction

Run Cuda C/C++ code into Google Colab

TL;DR

Select Runtime > Change runtime type > T4 GPU into the notebook and use the following cells:

# Upload file
from google.colab import files
uploaded = files.upload()
# Compile
!nvcc -Werror all-warnings -o <OUTPUT_FILE> <INPUT_FILE>
# Run
!./<OUTPUT_FILE>

Instructions

You can find the steps to follow inside the Tutorial.ipynb file, which you can open directly within Colab and execute the required code to try it out immediately.

Tips

  • When you're not using the notebook for a while, remember to turn it off clicking on Runtime > Disconnect and delete runtime, otherwise you might unnecessarily exhaust the available time you have.
    The available time is not well-defined, not even for the paid option. For the free version it seems to be 12 hours. In general, they refer to compute units as official metric, but they don't specify how much time or usage each unit represents. This allows them to change the value of compute units as they please and take advantage of you as they wish.

  • Time's up, wait tomorrow or change account.

  • Remember that you're on an Ubuntu virtual machine; you can use any shell command and install what you need. Of course, you can't use commands that launch GUI applications (like htop).

cuda_c-cpp_into_colab's People

Contributors

ianneee avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

mfkiwl

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.