So, recompiled everything again. The simple tests now run ok, no gpu resets, i have 69 passes and 2 fails:

Code:
Running ./math-int add 1 2 3
Passed
Running ./math-int add 2 1 3
Passed
Running ./math-int add -5 10 5
Passed
Running ./math-int add -1 -4 -5
Passed
Running ./math-int mul 4 5 20
Passed
Running ./math-int mul 8 0 0
Passed
Running ./math-int mul -3 8 -24
Passed
Running ./math-int mul -12 -6 72
Passed
Running ./math-int div 20 5 4
Passed
Running ./math-int div 23 5 4
Passed
Running ./math-int div 30 1 30
Passed
Running ./math-int div 57 -1 -57
Passed
Running ./math-int div 10 -2 -5
Passed
Running ./math-int div 17 -3 -5
Passed
Running ./math-int div -28 2 -14
Passed
Running ./math-int div -8 3 -2
Passed
Running ./math-int div -25 -5 5
Passed
Running ./math-int div -24 -5 4
Passed
Running ./math-int mod 18 6 0
Passed
Running ./math-int mod 59 12 11
Passed
Running ./math-int mod -20 5 0
Passed
Running ./math-int mod -18 5 -3
Passed
Running ./math-int mod 50 -10 0
Passed
Running ./math-int mod 16 -3 1
Passed
Running ./math-int mod 2147483647 12345 9172
Passed
Running ./math-int mod -2147483648 476 -128
Passed
Running ./math-int mod 10 20 10
Passed
Running ./math-int mod_nine 18 9 0
Failed
Running ./math-int mod_nine 23 9 5
Failed
Running ./math-int mod_four 20 4 0
Passed
Running ./math-int mod_four 5 4 1
Passed
Running ./get-global-id 100 100
Passed
Running ./get-global-id 250 1
Passed
Running ./math-int if_gt 5 4 1
Passed
Running ./math-int if_gt 5 6 0
Passed
Running ./math-int if_gt -20 10 0
Passed
Running ./math-int if_gt -5 8 0
Passed
Running ./math-int if_gt 12 -15 1
Passed
Running ./math-int if_gt 16 -3 1
Passed
Running ./math-int if_ge 8 7 1
Passed
Running ./math-int if_ge 10 10 1
Passed
Running ./math-int if_ge 20 30 0
Passed
Running ./math-int if_ge 3 -8 1
Passed
Running ./math-int if_ge -5 5 0
Passed
Running ./math-int if_ge -20 10 0
Passed
Running ./math-int if_eq 21 21 1
Passed
Running ./math-int if_eq 30 18 0
Passed
Running ./math-int if_eq -12 12 0
Passed
Running ./math-int if_eq 81 -81 0
Passed
Running ./math-int if_lt 2 10 1
Passed
Running ./math-int if_lt -20 3 1
Passed
Running ./math-int if_lt 15 3 0
Passed
Running ./math-int if_le 20 25 1
Passed
Running ./math-int if_le 18 18 1
Passed
Running ./math-int if_le -10 5 1
Passed
Running ./math-int if_le 18 9 0
Passed
Running ./math-int if_le 10 -20 0
Passed
Running ./math-int if_ne 10 9 1
Passed
Running ./math-int if_ne -20 20 1
Passed
Running ./math-int if_ne 31 -31 1
Passed
Running ./math-int if_ne 3 3 0
Passed
Running ./loop loop_lt 10
Passed
Running ./loop loop_le 10
Passed
Running ./loop loop_gt 10
Passed
Running ./loop loop_ge 10
Passed
Running ./math-int rotl 1 1 2
Passed
Running ./math-int rotl 1 32 1
Passed
Running ./math-int rotl -1 5 -1
Passed
Running ./math-int rotl 4096 23 8
Passed
Running ./use-host-ptr 10
Passed
Running ./vec-load
Passed
69 passes, 2 fails
There is some black magic involved in the compiling of llvm/clang sometimes it seems.