OpenMP
High Performance Computing, Tutorials
1. What is MPI? MPI (Message Passing Interface) is a standardized, portable library for writing parallel programs in distributed computing environments. It enables processes to communicate by sendi...
GMP The GNU Multiple Precision Arithmetic Library 安装 以下是针对一个没有 root 权限的 linux 操作系统的安装流程。 在 ubuntu/debian 上可以使用 sudo apt install libgmp-dev 安装 在 MacOS 上可以使用 brew install...
计算 $\pi$ 前情提要: 我们已经在 gmp 中展示了计算 $\pi$ 的方法, 接下来我们进一步对程序进行加速 Exploit CPU [\pi = \sum_{k=0}^{\infty}\left[\frac{1}{16^k}(\frac{4}{8k+1}-\frac{2}{8k+4}-\frac{1}{8k+5}-\frac{1}{8k+6})\right]] ...
背包问题 (Knapsack) 问题描述 0-1背包问题是非常经典的动态规划问题, 简单描述下这个问题, 首先你有容量为 W 的背包, 有 N 个物品可以选择装入或不装入背包, 每个物品有自己的价值和大小, 你所做的事就是在背包容量的限制下, 选择装入的物品以获得最高的利益。 求解思路 设有二维数组 dp[0..N][0..W], 其中 dp[i][j] 表示在考虑前 i 个物品并且...
Toolkits slurm openmp openmpi openacc cuda hip gmp Recommended Resources EssentialOfParallelComputing
See the two posts by Trevor Killeen: A Tour of PyTorch Internals (Part I) PyTorch Internals Part II - The Build System The idea comes from the question: How to understand PyTorch’s source code.
** Special Usages 1. Unpacking a dictionary into keyword arguments in a function call def greet(name, age): print(f"Hello, {name}, You are {age} years old.") person = {"name": "Alice", "age"...
TL; DR The Llama Model forward logic is located in LlamaModel.forward:src/transformers/models/llama/modeling_llama.py,518-624 First Setup Your Environment Clone the github repository “byrzhm/lla...
Frequently Used Command Line Tools tr … sort … uniq … awk … basename … Real World Problems Word Frequency Count # Read from the file words.txt and output the word frequency list to stdout. ...