Name | FP16 Compute | Memory Bandwidth | Memory Size | TDP |
---|---|---|---|---|
A100 | 312 TFLOP/s | 2 TB/s | 40 GB | 250 W |
H100 | 750 TFLOP/s | 2 TB/s | 80 GB | 350 W |
A10 | 125 TFLOP/s | 0.6 TB/s | 24 GB | 150 W |
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
#include <iostream> | |
#include <cuda_runtime.h> | |
int main() { | |
// Ref: https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__DEVICE.html | |
// Compilation command: nvcc device_query.cpp -arch=sm_100 -o device_query && ./device_query | |
int device = 0; | |
cudaDeviceProp prop; | |
cudaGetDeviceProperties(&prop, device); | |
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 torch | |
import torch.nn.functional as F | |
@torch.compile() | |
def baseline(q_BHTD, k_BJTD, v_BJTD, gq_ratio): | |
k_BHTD = k_BJTD.repeat_interleave(gq_ratio, 1) | |
v_BHTD = v_BJTD.repeat_interleave(gq_ratio, 1) | |
o_BHTD = F.scaled_dot_product_attention(q_BHTD, k_BHTD, v_BHTD, is_causal=True) | |
return o_BHTD |
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 functools | |
from dataclasses import asdict, dataclass | |
from typing import Optional | |
import torch | |
import torch.nn as nn | |
import torch.nn.functional as F | |
@dataclass |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder