Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
leissa committed Apr 3, 2024
1 parent dbc89fc commit 83a96fa
Show file tree
Hide file tree
Showing 13 changed files with 68 additions and 333 deletions.
2 changes: 1 addition & 1 deletion lit/autodiff/2out.thorin.disabled
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: rm -f %t.ll
// RUN: %thorin -p direct %s --output-ll %t.ll -o - | FileCheck %s
// RUN: %thorin -p direct %s --output-ll %t.ll -o -

.plugin core;
.plugin autodiff;
Expand Down
13 changes: 13 additions & 0 deletions lit/autodiff/general/simple_real.thorin
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// RUN: rm -f %t.ll
// RUN: %thorin %s --output-ll %t.ll -o -

.plugin mem;
.plugin math;
.plugin autodiff;

.fun f(a: %math.F32): %math.F32 = return (%math.arith.add 0 (a, a));

.con .extern main [mem : %mem.M, argc : .I32, argv : %mem.Ptr (%mem.Ptr (.I8, 0), 0), return : .Cn [%mem.M, %math.F32]] =
.con ret_cont r: %math.F32 = return (mem, r);
.let c = 43:%math.F32;
f (c,ret_cont);
21 changes: 0 additions & 21 deletions lit/autodiff/general/simple_real.thorin.disabled

This file was deleted.

14 changes: 0 additions & 14 deletions lit/clos/largeArr.thorin.disabled

This file was deleted.

94 changes: 0 additions & 94 deletions lit/direct/2out_2.thorin.disabled

This file was deleted.

107 changes: 0 additions & 107 deletions lit/direct/ad_mem.thorin.disabled

This file was deleted.

26 changes: 0 additions & 26 deletions lit/direct/ad_mem_eval.thorin.disabled

This file was deleted.

13 changes: 3 additions & 10 deletions lit/matrix/product.thorin.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@
.plugin core;
.plugin matrix;

.con .extern f [mem : %mem.M,
[k:.Nat, l:.Nat, m:.Nat],
M:%matrix.Mat (2,(m,k),%math.F64),
N:%matrix.Mat (2,(k,l),%math.F64),
return: .Cn[%mem.M, %matrix.Mat (2,(m,l),%math.F64)]] = {

.let (mem2,MN) = %matrix.prod (m,k,l, f64) (mem,M,N);

return (mem2, MN)
};
.con .extern f [mem : %mem.M, [k:.Nat, l:.Nat, m:.Nat], M:%matrix.Mat (2,(m,k),%math.F64), N:%matrix.Mat (2,(k,l),%math.F64), return: .Cn[%mem.M, %matrix.Mat (2,(m,l),%math.F64)]] =
.let (mem2,MN) = %matrix.prod (m,k,l, %math.f64) (mem,M,N);
return (mem2, MN);
25 changes: 6 additions & 19 deletions lit/matrix/read_mat.thorin.disabled
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
// RUN: rm -f %t.ll
// RUN: %thorin -e thorin %s -e ll -o %t | FileCheck %s
// RUN: %thorin %s --output-ll %t.ll -o -
// RUN: clang %t.ll -o %t -Wno-override-module

.plugin core;
.plugin matrix;

.con .extern f [mem : %mem.M,
[k:.Nat, l:.Nat],
M:%matrix.Mat (2,(k,l),.I32),
return: .Cn[%mem.M, .I32]] = {

.let two = %core.conv.u2u (k, .i32) 2I32;
.let three = %core.conv.u2u (l, .i32) 3I32;

.let (mem2,a) = %matrix.read
(2, (k,l), .I32)
(
mem,
M,
(two,three)
);

return (mem2, a)
};
.con .extern f(mem: %mem.M, [k: .Nat, l: .Nat], M: %matrix.Mat (2, (k, l), .I32), return: .Cn[%mem.M, .I32]) =
.let two = %core.idx k 0 2;
.let three = %core.idx l 0 3;
.let (mem2,a) = %matrix.read (2, (k,l), .I32) (mem, M, (two, three));
return (mem2, a);
2 changes: 1 addition & 1 deletion lit/matrix/read_transpose.thorin
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
.con .extern cont [mem : %mem.M, m : (%matrix.Mat MT), return : .Cn [%mem.M, .I32]] = {
.let (mem2,m2) = %matrix.transpose ((2,4), .I32) (mem,m);
.let idx2 = (3_4, 1_2);
.let (mem3,d) = %matrix.read MT2 (mem2,m2, idx2);
.let (mem3,d) = %matrix.read MT2 (mem2, m2, idx2);

// .let idx = (.tt,3:(.Idx 4));
// .let d = %matrix.read MT (m, idx);
Expand Down
13 changes: 13 additions & 0 deletions lit/mem/largeArr.thorin
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// RUN: rm -f %t.ll
// RUN: timeout 10 %thorin -p clos %s --output-ll %t.ll --output-thorin -

.plugin core;
.plugin mem;

.let size = 100000000;

.con .extern main(mem: %mem.M, argc: .I32, argv : %mem.Ptr («⊤:.Nat; %mem.Ptr («⊤:.Nat; .I8», 0)», 0), return : .Cn [%mem.M, .I32]) =
.let (`mem, arr) = %mem.alloc (<<size; .I32>>, 0) mem;
.let lea = %mem.lea (size, <size; .I32>, 0) (arr, %core.idx size 0 0);
.let (`mem, val) = %mem.load (mem, lea);
return (mem, 1I32);
15 changes: 0 additions & 15 deletions lit/mem/nested_alloc.thorin.disabled

This file was deleted.

Loading

0 comments on commit 83a96fa

Please sign in to comment.