8000 GitHub - tensara/tensara: Competitive GPU kernel optimization platform.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

tensara/tensara

Repository files navigation

Tensara

A platform for GPU programming challenges. Write efficient GPU kernels and compare your solutions with other developers!

Getting Started

Prerequisites

  • Node.js 18+ and npm/yarn/pnpm
  • PostgreSQL (for local development) or a Supabase account
  • Git

Environment Setup

  1. Clone the repository:
git clone https://github.com/tensara/tensara
cd tensara
  1. Install dependencies:
npm install
# or
yarn
# or
pnpm install
  1. Set up your environment variables by copying the example file:
cp .env.example .env

Database Setup

You have a few options for setting up the database:

Option 1: Local PostgreSQL

  1. Install PostgreSQL on your machine if you haven't already:

    • macOS (using Homebrew): brew install postgresql
    • Linux: sudo apt-get install postgresql
    • Windows: Download from PostgreSQL website
  2. Start PostgreSQL service:

    • macOS: brew services start postgresql
    • Linux: sudo service postgresql start
    • Windows: It should start automatically as a service
  3. Create a new database:

createdb tensara_db
  1. Update your .env file with local PostgreSQL connection string:
DATABASE_URL="postgresql://your_username@localhost:5432/tensara_db"

Option 2: Supabase (Hosted PostgreSQL)

  1. Create a new project on Supabase

  2. Once your project is created, go to Settings > Database to find your connection string

  3. Update your .env file with the Supabase connection string:

DATABASE_URL="postgresql://postgres:[YOUR-PASSWORD]@db.[YOUR-PROJECT-REF].supabase.co:5432/postgres"

Final Setup Steps

  1. Push the database schema:
npx prisma db push
  1. Generate Prisma Client:
npx prisma generate
  1. Push the problems to the database. Follow the steps in the problems repository.
  2. Start the development server:
npm run dev
# or
yarn dev
# or
pnpm dev

Your app should now be running at http://localhost:3000!

Environment Variables

Create a .env file in the root directory with the following variables:

# Database connection string
DATABASE_URL="your_connection_string_here"

# NextAuth configuration
NEXTAUTH_SECRET="your_nextauth_secret"
AUTH_GITHUB_ID=""
AUTH_GITHUB_SECRET=""
NEXTAUTH_URL="http://localhost:3000"

# Google Analytics ID (can be ignored until production)
NEXT_PUBLIC_GA_ID=""

MODAL_CHECKER_SLUG=""
MODAL_BENCHMARK_SLUG=""

MODAL_ENDPOINT=""

Sponsors

Thank you to our sponsors who help make Tensara possible:

  • Modal - Modal lets you run jobs in the cloud, by just writing a few lines of Python. Customers use Modal to deploy Gen AI models at large scale, fine-tune large language models, run protein folding simulations, and much more.

We use Modal to securely run accurate benchmarks on various GPUs.

Interested in sponsoring? Contact us at sponsor@tensara.org

About

Competitive GPU kernel optimization platform.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  
0