update editorconfig, enforce via CI (#1343)

* update editorconfig to set unix-style newlines and trim whitespace

* add editorconfig github action to the CI

* fix whitespace
This commit is contained in:
Pavol Rusnak
2023-07-31 03:44:30 +02:00
committed by GitHub
parent c2b82ea8ac
commit da2efecbe2
23 changed files with 182 additions and 158 deletions

View File

@@ -56,7 +56,7 @@ bufs = [c,a,b]
module = ir.Module(name=__file__)
func = ir.Function(module, ir.FunctionType(ir.IntType(64), [ir.FloatType().as_pointer()]*3), name='exec')
# load all
# load all
entry = ir.IRBuilder(func.append_basic_block(name="entry"))
zm, xm, ym = [entry.ptrtoint(func.args[i], ir.IntType(64)) for i in range(3)]

View File

@@ -135,7 +135,7 @@ int main() {
for (int i = 0; i < 4000; i++) {
memset(C, 0, N*N*sizeof(float));
#if NTHREADS != 1
#if NTHREADS != 1
nready = 0;
ndone = 0;
pthread_mutex_lock(&lock);
@@ -147,7 +147,7 @@ int main() {
#endif
uint64_t start = nanos();
#if NTHREADS == 1
#if NTHREADS == 1
matmul(0, N);
#else
// unlocking mutex starts threads
@@ -156,7 +156,7 @@ int main() {
#endif
uint64_t end = nanos();
#if NTHREADS != 1
#if NTHREADS != 1
for (int j = 0; j < NTHREADS; j++) {
pthread_join(threads[j], NULL);
}

View File

@@ -21,7 +21,7 @@ if __name__ == "__main__":
et = time.monotonic()
s = et-st
print(f"{flop/s * 1e-9:.2f} GFLOP/S, {s*1e3:.2f} ms")
with open("/tmp/matmul", "wb") as f:
f.write(A.data)
f.write(B.data)