- MoonRay — [[September 8th, 2024]]
- AOV system is interesting. Light path expressions primarily.
- "Material AOV" provides different kinds of syntax for debugging materials.
- Use of different JIT compilation through LLVM to implement their ISPC framework. SPMD computation on an Arras cluster.
- They take a JSON describing the material and compile it down into shaders!
- Kind of cool to have an out-of-the-box optimization.
- ISPC / SPMD is close to a CUDA thread actually, running multiple of them within the same core. Only works for this compiler. It "looks like" gang scheduling, but in reality it's perhaps converting all of the instructions into AVX?
- Exotic execution model, CMU slides: https://www.cs.cmu.edu/afs/cs/academic/class/15418-s18/www/lectures/03_progmodels.pdf
- https://ispc.github.io/ispc_for_xe.html
- AOV system is interesting. Light path expressions primarily.
- This is also why the BVH data structure is important? Intel Embree vs Nvidia RTX
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module r2test | |
| go 1.20 | |
| require ( | |
| github.com/aws/aws-sdk-go-v2 v1.20.1 | |
| github.com/aws/aws-sdk-go-v2/config v1.18.33 | |
| github.com/aws/aws-sdk-go-v2/credentials v1.13.32 | |
| github.com/aws/aws-sdk-go-v2/service/s3 v1.38.2 | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Demo of yield-dependent behavior when a coroutine blocks the event loop. | |
| # | |
| # Vary the number of calls to asyncio.sleep(0.0) in either block, and behavior will change greatly. | |
| # | |
| # (4 in top block, 9 in bottom block) | |
| # 0 3.0027458667755127 | |
| # 1 2.0022785663604736 | |
| # 2 8.320808410644531e-05 | |
| # 3 4.38690185546875e-05 | |
| # 4 3.838539123535156e-05 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| import subprocess | |
| import numpy as np | |
| import pandas as pd | |
| from fastapi import HTTPException | |
| from modal import Image, Stub, web_endpoint | |
| stub = Stub("plasmid-data") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """This is a vendored copy of parts of the 'psutil' Python package. | |
| It only contains what's needed to run the `net_connections()` function, which | |
| lists active network connections from all processes on the system. | |
| """ | |
| import base64 | |
| from collections import defaultdict, namedtuple | |
| import errno |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::{collections::HashMap, sync::Arc}; | |
| use md5::{Digest, Md5}; | |
| #[derive(Clone)] | |
| pub enum Node { | |
| Subtree(Arc<Subtree>), | |
| Leaf(Leaf), | |
| } |
What is [[Modal]] (to an audience of my people at Harvard/MIT):
(Preface: I really like computers! Just saying.)
Modal does two things: rent out flexible increments of compute, and build the systems for people to interact with remote computers.
Why? Computers are all around us; you checked the weather this morning, but a wind turbine operator might check the state of the electrical grid, restaurants manage inventory, even the ISS navigates in orbit with computers.
Computers are how we process huge amounts of data (in energy, elections, housing, biology…), which would never be possible by hand, and in that sense computation augments how we understand the world.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // nvcc hello_matmul.cu -o hello_matmul | |
| // ./hello_matmul | |
| // Quick setup for cloud GPU with VS Code (Modal): | |
| // | |
| // $ pip install modal && modal setup | |
| // $ modal volume create learn-cuda | |
| // $ modal launch vscode --gpu t4 --volume learn-cuda --image nvidia/cuda:12.4.0-devel-ubuntu22.04 | |
| #include <cstdio> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Graphics state used to synchronously read data from WebGPU buffers. | |
| * | |
| * This trick is borrowed from TensorFlow.js. Basically, the idea is to create | |
| * an offscreen canvas with one pixel for every 4 bytes ("device storage"), then | |
| * configure it with a WebGPU context. Copy the buffer to a texture, then draw | |
| * the canvas onto another offscreen canvas with '2d' context ("host storage"). | |
| * | |
| * Once it's on host storage, we can use `getImageData()` to read the pixels | |
| * from the image directly. |