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 pathlib | |
import pprint | |
import re | |
import subprocess | |
import fire | |
import marko | |
from mastodon import Mastodon |
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
module { | |
func.func @box_blur(%arg0: !secret.secret<tensor<4096xi16>>) -> !secret.secret<tensor<4096xi16>> { | |
%cst = arith.constant dense<4096> : tensor<64xindex> | |
%cst_0 = arith.constant dense<[49, 16, 62, 7, 45, 4, 25, 11, 37, 58, 29, 21, 50, 41, 33, 54, 46, 48, -1, 61, 17, 3, 10, 26, 6, 34, 57, 38, 22, 53, 30, 42, 31, 60, 47, 2, 18, 14, 5, 39, 13, 9, 23, 52, 27, 56, 35, 43, 19, 15, 8, 44, 40, 12, 1, 24, 20, 51, 28, 59, 36, 32, 55]> : tensor<63xindex> | |
%cst_1 = arith.constant dense<4096> : tensor<128xindex> | |
%cst_2 = arith.constant dense<"0x1D0000000000000004000000000000001000000000000000040000000000000010000000000000003A000000000000003A000000000000003E000000000000003E0000000000000036000000000000000B0000000000000019000000000000002D0000000000000007000000000000000B0000000000000036000000000000002D000000000000002100000000000000070000000000000021000000000000003200000000000000290000000000000011000000000000001500000000000000250000000000000029000000000000001500000000000000250000000000000032000000000000 |
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
// bazel run //tools:heir-opt -- --secretize=entry-function=box_blur --wrap-generic --canonicalize --cse --affine-loop-unroll=unroll-factor=2 --affine-loop-unroll=unroll-factor=2 --canonicalize --cse --affine-loop-unroll=unroll-factor=64 --canonicalize --cse $PWD/tests/simd/box_blur.mlir > out.mlir | |
module { | |
func.func @box_blur(%arg0: !secret.secret<tensor<4096xi16>>) -> !secret.secret<tensor<4096xi16>> { | |
%c63 = arith.constant 63 : index | |
%c62 = arith.constant 62 : index | |
%c61 = arith.constant 61 : index | |
%c60 = arith.constant 60 : index | |
%c59 = arith.constant 59 : index | |
%c58 = arith.constant 58 : index |
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 argparse | |
from github import Github, Auth | |
parser = argparse.ArgumentParser(description="Search for code on GitHub") | |
parser.add_argument('query') | |
parser.add_argument('-o', '--output_file') | |
parser.add_argument('-m', '--max_iters') | |
args = parser.parse_args() |
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
module { | |
func.func @add_one(%arg0: !secret.secret<i8>) -> !secret.secret<i8> { | |
%c1_i8 = arith.constant 1 : i8 | |
%false = arith.constant false | |
%0 = secret.generic ins(%arg0 : !secret.secret<i8>) { | |
^bb0(%arg1: i8): | |
%32 = comb.extract %arg1 from 0 : (i8) -> i1 | |
secret.yield %32 : i1 | |
} -> !secret.secret<i1> | |
%1 = comb.extract %c1_i8 from 0 : (i8) -> i1 |
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
module { | |
func.func @add_one(%arg0: !secret.secret<i8>) -> !secret.secret<i8> { | |
%c1_i8 = arith.constant 1 : i8 | |
%0 = secret.generic ins(%arg0, %c1_i8 : !secret.secret<i8>, i8) { | |
^bb0(%arg1: i8, %arg2: i8): | |
%1 = comb.extract %arg1 from 0 : (i8) -> i1 | |
%2 = comb.extract %arg2 from 0 : (i8) -> i1 | |
%false = arith.constant false | |
%3 = comb.truth_table %1, %2, %false -> 8 : ui8 | |
%4 = comb.extract %arg1 from 1 : (i8) -> i1 |
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
; ModuleID = 'LLVMDialectModule' | |
source_filename = "LLVMDialectModule" | |
@__constant_3xi32 = private constant [3 x i32] [i32 2, i32 3, i32 4], align 64 | |
@__constant_10xi32 = private constant [10 x i32] zeroinitializer, align 64 | |
declare ptr @malloc(i64) | |
declare void @free(ptr) |
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
/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ | |
|* *| | |
|* Rewriters *| | |
|* *| | |
|* Automatically generated file, do not edit! *| | |
|* *| | |
\*===----------------------------------------------------------------------===*/ | |
/* Generated from: | |
lib/Dialect/Poly/PolyPatterns.td:8 |
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
/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ | |
|* *| | |
|* Op Definitions *| | |
|* *| | |
|* Automatically generated file, do not edit! *| | |
|* *| | |
\*===----------------------------------------------------------------------===*/ | |
#ifdef GET_OP_LIST | |
#undef GET_OP_LIST |
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
/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ | |
|* *| | |
|* TypeDef Definitions *| | |
|* *| | |
|* Automatically generated file, do not edit! *| | |
|* *| | |
\*===----------------------------------------------------------------------===*/ | |
#ifdef GET_TYPEDEF_LIST | |
#undef GET_TYPEDEF_LIST |