{"id":29196654,"url":"https://github.com/modular/mojo-gpu-puzzles","last_synced_at":"2026-02-03T13:03:45.462Z","repository":{"id":291044318,"uuid":"975749433","full_name":"modular/mojo-gpu-puzzles","owner":"modular","description":"Learn GPU Programming in Mojo🔥 by Solving Puzzles","archived":false,"fork":false,"pushed_at":"2026-01-31T23:12:43.000Z","size":177763,"stargazers_count":287,"open_issues_count":3,"forks_count":296,"subscribers_count":9,"default_branch":"main","last_synced_at":"2026-02-02T10:57:38.814Z","etag":null,"topics":["gpu","learn-by-doing","mojo","programming"],"latest_commit_sha":null,"homepage":"https://puzzles.modular.com/","language":"Mojo","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/modular.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-30T20:48:00.000Z","updated_at":"2026-02-02T02:23:36.000Z","dependencies_parsed_at":"2025-10-05T11:36:39.730Z","dependency_job_id":null,"html_url":"https://github.com/modular/mojo-gpu-puzzles","commit_stats":null,"previous_names":["modular/mojo-gpu-puzzles"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/modular/mojo-gpu-puzzles","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modular%2Fmojo-gpu-puzzles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modular%2Fmojo-gpu-puzzles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modular%2Fmojo-gpu-puzzles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modular%2Fmojo-gpu-puzzles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/modular","download_url":"https://codeload.github.com/modular/mojo-gpu-puzzles/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modular%2Fmojo-gpu-puzzles/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29046503,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T10:09:22.136Z","status":"ssl_error","status_checked_at":"2026-02-03T10:09:16.814Z","response_time":96,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gpu","learn-by-doing","mojo","programming"],"created_at":"2025-07-02T06:08:00.967Z","updated_at":"2026-02-03T13:03:43.230Z","avatar_url":"https://github.com/modular.png","language":"Mojo","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"book/src/puzzles_images/puzzle-mark.svg\" alt=\"Mojo GPU Puzzles Logo\" width=\"150\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003eMojo🔥 GPU Puzzles\u003c/h1\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ch3 align=\"center\"\u003eLearn GPU Programming in Mojo🔥 Through Interactive Puzzles🧩\u003c/h3\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#overview\"\u003e\u003cstrong\u003eOverview\u003c/strong\u003e\u003c/a\u003e •\n  \u003ca href=\"#why-mojo\"\u003e\u003cstrong\u003eWhy Mojo\u003c/strong\u003e\u003c/a\u003e •\n  \u003ca href=\"#getting-started\"\u003e\u003cstrong\u003eGetting Started\u003c/strong\u003e\u003c/a\u003e •\n  \u003ca href=\"#development\"\u003e\u003cstrong\u003eDevelopment\u003c/strong\u003e\u003c/a\u003e •\n  \u003ca href=\"#community\"\u003e\u003cstrong\u003eCommunity\u003c/strong\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/modular/mojo-gpu-puzzles/actions/workflows/ci.yml\"\u003e\n    \u003cimg src=\"https://github.com/modular/mojo-gpu-puzzles/actions/workflows/ci.yml/badge.svg?branch=main\" alt=\"CI\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://docs.modular.com/mojo\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Powered%20by-Mojo-FF5F1F\" alt=\"Powered by Mojo\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://docs.modular.com/max/get-started/#stay-in-touch\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Subscribe-Updates-00B5AD?logo=mail.ru\" alt=\"Subscribe for Updates\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://forum.modular.com/c/\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Modular-Forum-9B59B6?logo=discourse\" alt=\"Modular Forum\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://discord.com/channels/1087530497313357884/1098713601386233997\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Discord-Join_Chat-5865F2?logo=discord\" alt=\"Discord\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## Overview\n\n\u003e _\"For the things we have to learn before we can do them, we learn by doing them.\"_\n\u003e — Aristotle, (Nicomachean Ethics)\n\nWelcome to **Mojo🔥 GPU Puzzles, Edition 1** — an interactive approach to learning GPU programming through hands-on puzzle solving. Instead of traditional textbook learning, you'll immediately dive into writing real GPU code and seeing the results.\n\nStart Learning Now 👉 [puzzles.modular.com](https://puzzles.modular.com/)\n\n\u003e 📬 [Subscribe to updates](https://www.modular.com/company/talk-to-us) to get notified when new puzzles are released!\n\n## Why Mojo🔥\n\n[Mojo](https://docs.modular.com/mojo/manual/) represents a revolutionary approach to GPU programming, making massive parallelism accessible while maintaining systems-level performance:\n\n- 🐍 **Python-like Syntax** with systems programming capabilities\n- ⚡ **Zero-cost Abstractions** that compile to efficient machine code\n- 🛡️ **Strong Type System** catching errors at compile time\n- 📊 **Built-in Tensor Support** with hardware-aware optimizations\n- 🔧 **Direct Hardware Access** to CPU and GPU intrinsics\n- 🔄 **Cross-Hardware Portability** for CPUs and GPUs\n- 🎯 **Ergonomic Improvements** over traditional C/C++\n\n## Getting Started\n\n### Prerequisites\n\nYou'll need a [compatible GPU](https://docs.modular.com/max/faq#gpu-requirements) to run the examples.\n\n1. Visit [puzzles.modular.com](https://puzzles.modular.com)\n2. Clone this repository\n\n   ```bash\n   git clone https://github.com/modular/mojo-gpu-puzzles\n   cd mojo-gpu-puzzles\n   ```\n\n3. Install a package manager to run the Mojo🔥 programs:\n\n   ### **Option 1 (Highly recommended)**: [pixi](https://pixi.sh/latest/#installation)\n\n    `pixi` is the **recommended option** for this project because:\n    - Easy access to Modular's MAX/Mojo packages\n    - Handles GPU dependencies\n    - Full conda + PyPI ecosystem support\n\n    **Note: A few puzzles only work with `pixi`.**\n\n    **Install:**\n\n    ```bash\n    curl -fsSL https://pixi.sh/install.sh | sh\n    ```\n\n    **Update:**\n\n    ```bash\n    pixi self-update\n    ```\n\n   ### Option 2: [`uv`](https://docs.astral.sh/uv/getting-started/installation/)\n\n    **Install:**\n\n    ```bash\n    curl -fsSL https://astral.sh/uv/install.sh | sh\n    ```\n\n    **Update:**\n\n    ```bash\n    uv self update\n    ```\n\n    **Create a virtual environment:**\n\n    ```bash\n    uv venv \u0026\u0026 source .venv/bin/activate\n    ```\n\n4. Start solving puzzles!\n\n## Development\n\nWe use `pixi` for development as it includes `uv` and also supports conda packages (like `mdbook` from the `conda-forge` channel) needed for development workflows.\n\n\u003e **WSL Users**: Before running `pixi run book`, install the required browser integration package:\n\u003e ```bash\n\u003e sudo apt update \u0026\u0026 sudo apt install wslu\n\u003e ```\n\n```bash\n# Build and serve the book\npixi run book\n\n# Test solutions on GPU\npixi run tests\n# Or a specific puzzle\npixi run tests pXX\n# Or manually\npixi run mojo/python solutions/pXX/pXX.{mojo,py}\n\n# Run GPU sanitizers for debugging on NVIDIA GPUs using `compute-sanitizer`\npixi run memcheck  \u003coptional pXX\u003e    # Detect memory errors\npixi run racecheck \u003coptional pXX\u003e    # Detect race conditions\npixi run synccheck \u003coptional pXX\u003e    # Detect synchronization errors\npixi run initcheck \u003coptional pXX\u003e    # Detect uninitialized memory access\n# Or run all sanitizer tools\npixi run sanitizers pXX\n# Or manually\n# Note: ignore the mojo runtime error collision with the sanitizer. Look for `Error SUMMARY`\npixi run compute-sanitizer --tool {memcheck,racecheck,synccheck,initcheck} mojo solutions/pXX/pXX.mojo\n\n# Format code\npixi run format\n```\n\n## Contributing\n\nWe welcome contributions! Whether it's:\n\n- 📝 Improving explanations\n- 🐛 Fixing bugs ([report bug](https://github.com/modular/mojo-gpu-puzzles/issues/new?template=bug_report.yml))\n- 💡 Suggesting improvements ([request feature](https://github.com/modular/mojo-gpu-puzzles/issues/new?template=feature_request.yml))\n\nPlease feel free to:\n\n1. Fork the repository\n2. Create your feature branch\n3. Submit a pull request\n\n## Community\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://docs.modular.com/max/get-started/#stay-in-touch\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Subscribe-Updates-00B5AD?logo=mail.ru\" alt=\"Subscribe for Updates\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://forum.modular.com/c/\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Modular-Forum-9B59B6?logo=discourse\" alt=\"Modular Forum\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://discord.com/channels/1087530497313357884/1098713601386233997\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Discord-Join_Chat-5865F2?logo=discord\" alt=\"Discord\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nJoin our vibrant community to discuss GPU programming, share solutions, and get help!\n\n## Acknowledgments\n\n- Thanks to all our [contributors](https://github.com/modular/mojo-gpu-puzzles/graphs/contributors)\n- Initial puzzles are heavily inspired by [GPU Puzzles](https://github.com/srush/GPU-Puzzles)\n- Built with [mdBook](https://rust-lang.github.io/mdBook/)\n\n## License\n\nThis project is licensed under the LLVM License - see the [LICENSE](LICENSE) file for details.\n\n\u003cp align=\"center\"\u003e\n  \u003csub\u003eBuilt with ❤️ by the Modular team\u003c/sub\u003e\n\u003c/p\u003e\n","funding_links":[],"categories":["Projects using Pixi"],"sub_categories":["GPU Computing"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodular%2Fmojo-gpu-puzzles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmodular%2Fmojo-gpu-puzzles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodular%2Fmojo-gpu-puzzles/lists"}