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
#!/bin/bash -e | |
curl -O https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg | |
hdiutil attach googlechrome.dmg | |
SRC=/Volumes/Google\ Chrome/Google\ Chrome.app/Contents/Frameworks/Google\ Chrome\ Framework.framework/Libraries/WidevineCdm | |
DEST=/Applications/Chromium.app/Contents/Frameworks/Chromium\ Framework.framework/Libraries/ | |
cp -R "$SRC" "$DEST" | |
hdiutil detach /Volumes/Google\ Chrome/ |
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
d4::pa_ax3 |- = x + x 0 | |
d5::ax-1 |- implies | |
= x + x 0 | |
implies = y + y 0 = x + x 0 | |
d3:d4,d5:ax-mp |- implies = y + y 0 = x + x 0 | |
3:d3:alpha_2 |- implies = y + y 0 forall x = x + x 0 | |
d6::pa_ax3 |- = y + y 0 | |
5:d6,3:ax-mp |- forall x = x + x 0 |
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 <vector> | |
int main() { | |
//char cdat[] = "12345678"; | |
char cdat[] = "59791911701697178620772166487621926539855976237879300869872931303532122404711706813176657053802481833015214226705058704017099411284046473395211022546662450403964137283487707691563442026697656820695854453826690487611172860358286255850668069507687936410599520475680695180527327076479119764897119494161366645257480353063266653306023935874821274026377407051958316291995144593624792755553923648392169597897222058613725620920233283869036501950753970029182181770358827133737490530431859833065926816798051237510954742209939957376506364926219879150524606056996572743773912030397695613203835011524677640044237824961662635530619875905369208905866913334027160178"; | |
//char cdat[] = "03036732577212944063491565474664"; | |
int N = strlen(cdat)*10000; | |
int *dat = new int[N]; | |
int *cc = new int[N+1]; | |
for (int j = 0; j < N; j+=strlen(cdat)) { |
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
diff --git a/clang/include/clang/AST/Stmt.h b/clang/include/clang/AST/Stmt.h | |
index 13f265223..61b0a83c6 100644 | |
--- a/clang/include/clang/AST/Stmt.h | |
+++ b/clang/include/clang/AST/Stmt.h | |
@@ -2459,13 +2459,16 @@ class ForStmt : public Stmt { | |
public: | |
ForStmt(const ASTContext &C, Stmt *Init, Expr *Cond, VarDecl *condVar, | |
Expr *Inc, Stmt *Body, SourceLocation FL, SourceLocation LP, | |
- SourceLocation RP); | |
+ SourceLocation RP, bool is_fore_statement=false); |
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
%pylab inline | |
%load_ext autoreload | |
%autoreload 2 | |
from tools.lib.route import Route | |
from tools.lib.logreader import LogReader | |
r,num = Route("ce2fbd370f78ef21|2020-11-27--16-27-28"),10 | |
#r,num = Route("f66032c2b5aa18ac|2020-12-04--09-33-54"),30 | |
alr = [] | |
for n in range(num-1, num+5): |
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
# instructions to install openpilot on a pixel 3 | |
# enter fastboot with power + volume down | |
# make sure bootloader is unlocked | |
# make sure modern version of android platform tools is installed | |
mkdir pixel | |
wget https://dl.google.com/dl/android/aosp/blueline-pq3a.190801.002-factory-f3d66c49.zip | |
unzip blueline-pq3a.190801.002-factory-f3d66c49.zip | |
cd blueline-pq3a.190801.002/ | |
./flash-all.sh |
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 | |
torch.set_grad_enabled(False) | |
model = torch.nn.Linear(1, 1, bias=False).cuda() | |
model.weight[:] = 1. | |
print(model(torch.Tensor([2349.]).cuda())) |
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
# given a number in the range [amin, amax] (inclusive) | |
# what are the min and max of that number after modding it by b? | |
# c style modulus | |
def modn(a, b): return -((-a)%b) if a < 0 else a%b | |
# aka a fast version of | |
def slow_modrange(amin, amax, b): | |
values = [modn(rv, b) for rv in range(amin, amax+1)] | |
return min(values), max(values) |
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 os | |
import sys | |
import time | |
import torch | |
import torch.distributed as dist | |
import torch.multiprocessing as mp | |
def all_reduce_latency(nbytes, rank): | |
buf = torch.randn(nbytes // 4).cuda(rank) |
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
*** 0 E_64_32_6_6n5 arg 2 sz [64, 1, 1] [32, 1, 1] OPs 33M/ 0.00G mem 3.07 GB tm 3.20us/ 0.00ms (10483.20 GFLOPS, 297.02 GB/s) | |
*** 1 r_128_31_31_3_2_3_2_2_2_8n26 arg 3 sz [31, 31, 128] [2, 3, 1] OPs 283M/ 0.03G mem 3.07 GB tm 218.44us/ 0.22ms ( 1297.42 GFLOPS, 216.24 GB/s) | |
*** 2 r_1024_32_16_2_3_4_4_8n6 arg 3 sz [32, 1024, 1] [2, 16, 1] OPs 805M/ 0.32G mem 3.07 GB tm 64.68us/ 0.29ms (12450.43 GFLOPS, 1426.62 GB/s) |