This file contains 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._dynamo.config as config | |
import sys | |
config.recompile_limit = float('inf') | |
torch.set_default_device("mps") | |
torch.set_printoptions(precision=16) | |
class Model(torch.nn.Module): | |
def __init__(self): |
This file contains 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 | |
# My git clone of the gcc tree | |
GCCSRC=~/bisect/gcc-bisect/gcc | |
# My pre-processed test case | |
TESTSRC=~/bisect/gcc-bisect/test.cpp | |
cd ~/bisect/gcc-bisect |
This file contains 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
# 3 "" 3 | |
template < class a > struct b { | |
a c; | |
}; | |
template < class > struct o; | |
template < class d > struct o< d * > { | |
typedef d e; | |
}; | |
template < class f > class g { | |
public: |
This file contains 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
./lldb-mi | |
(gdb) | |
-unknown-command | |
^error,msg="Driver. Received command '-unknown-command'. It was not handled. Command 'unknown-command' not in Command Factory" | |
(gdb) | |
-file-exec-and-symbols ./a.out | |
^done | |
(gdb) | |
=library-loaded,id="/Users/davide/work/llvm-project-20170507/build-py/bin/a.out",target-name="/Users/davide/work/llvm-project-20170507/build-py/bin/a.out",host-name="/Users/davide/work/llvm-project-20170507/build-py/bin/a.out",symbols-loaded="1",symbols-path="/Users/davide/work/llvm-project-20170507/build-py/bin/a.out.dSYM/Contents/Resources/DWARF/a.out",loaded_addr="-",size="4096" | |
-break-insert -f main |
This file contains 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
$ cat mi-driver.py | |
from builtins import bytes | |
import subprocess | |
import sys | |
from subprocess import Popen | |
from subprocess import PIPE | |
def sendCmd(process, command): |
This file contains 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
dtdebugger:omega davide$ DYLD_LIBRARY_PATH=/usr/lib/swift lldb -- /Users/davide/Downloads/Xcode.app/Contents/Developer/usr/bin/xctest -XCTest IntegrationTests.IntegrationTests/testKillContent /Users/davide/omega/omega/.build/x86_64-apple-macosx/debug/OmegaPackageTests.xctest | |
(lldb) target create "/Users/davide/Downloads/Xcode.app/Contents/Developer/usr/bin/xctest" | |
Current executable set to '/Users/davide/Downloads/Xcode.app/Contents/Developer/usr/bin/xctest' (x86_64). | |
(lldb) settings set -- target.run-args "-XCTest" "IntegrationTests.IntegrationTests/testKillContent" "/Users/davide/omega/omega/.build/x86_64-apple-macosx/debug/OmegaPackageTests.xctest" | |
(lldb) r | |
Process 27933 launched: '/Users/davide/Downloads/Xcode.app/Contents/Developer/usr/bin/xctest' (x86_64) | |
Test Suite 'Selected tests' started at 2019-02-11 13:11:30.525 | |
Test Suite 'OmegaPackageTests.xctest' started at 2019-02-11 13:11:30.525 | |
Test Suite 'IntegrationTests' started at 2019-02-11 13:11:30.525 | |
Test Case '-[IntegrationTests.IntegrationTests te |
This file contains 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
__attribute__((noinline)) | |
int fn1 (long int x, long int y, long int z) { | |
int l = x * 2; | |
int q = y * z; | |
return l + q; | |
} | |
__attribute__((noinline)) long int | |
fn2 (long int a, long int b, long int c) | |
{ |
This file contains 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
func f1() -> Int32 { | |
let x : Int32 = Int32.max | |
let y : Int32 = 42 | |
return x + y | |
} | |
func f2(_ b : Bool) -> Int32 { | |
let verylarge : Int32 = Int32.max |
This file contains 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
davide@Davidinos-Mac-Pro ~/w/l/b/bin> ./clang ./pat.c -o pat -O1 -g | |
davide@Davidinos-Mac-Pro ~/w/l/b/bin> cat pat.c | |
int f(int x) { | |
asm(""); | |
return 0; | |
} | |
__attribute__((noinline)) | |
int g(int x) { | |
return x; |
This file contains 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
# Python reference http://lldb.llvm.org/python-reference.html | |
import lldb | |
def main(): | |
dbg = lldb.SBDebugger.Create() | |
target = dbg.CreateTarget("a.out") | |
if not target: | |
print("Can't create target!") | |
return 1 |
NewerOlder