profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/tkonolige/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Tristan Konolige tkonolige OctoML

octoml/synr 43

A library for syntactically rewriting Python programs, pronounced (sinner).

hubris-lang/hubris 19

A dependently typed programming language, and verification tool

JuliaSparse/MatrixMarket.jl 15

Julia package to read MatrixMarket file format

Petesta/geocodr 5

Geocodr allows you to find programmers who are near you.

tkonolige/city2ba 4

Tools for generating synthetic bundle adjustment datasets

jroesch/tvm 3

Open deep learning compiler stack for cpu, gpu and specialized accelerators

tkonolige/AMG.jl 2

Algebraic Multigrid in Julia

jroesch/Tweak 1

An small embeddable scripting language in Scala.

hubris-lang/llvm-sys.rs 0

Rust bindings to LLVM. (Mirror of https://bitbucket.org/tari/llvm-sys.rs/)

jroesch/dda 0

Doubtfully Distributed Arrays (distributed parallel high performance arrays for CS240).

PullRequestReviewEvent

Pull request review commentapache/tvm-rfcs

[RFC][TVMScript] New namespace for tvmscript

+- Feature Name: TVM Script Namespace+- Start Date: 2021-09-23+- RFC PR: [apache/tvm-rfcs#0036](https://github.com/apache/tvm-rfcs/pull/36)+- GitHub Issue: [apache/tvm#0000](https://github.com/apache/tvm/issues/0000)++# Summary++[summary]: #summary++This is a RFC for the new namespace and user interface for TVM script.++- Use tvm.script as the `root` namespace for all TVM script related stuff+- Use `tvm.script.tir` for `TIR`, and idiomatically import it as `T`, like Keras is usually imported as K+- To be consistent with the names of their resulting types, use+  - `tvm.script.ir_module` for `IRModule`+  - `T.prim_func` for `tir.PrimFunc`++# Motivation++[motivation]: #motivation++TVMScript is a fancy tools to write TIR in Python syntax. However, it's not fully compatible with native Python tools (e.g., pylint) because it is not a runnable program in Python.++We have following pain points:++- No Python auto-completion support+- Usually conflicts with pylint+- APIs scatter in namespaces like tvm.script, tvm.tir, tvm.script.ty+- Somewhat non-trivial to understand at first glance what the decorator generates++With the new proposal, we are able to provide type stubs that provides users with TVM scripts that work well with linting and auto-completion.++# Guide-level explanation++[guide-level-explanation]: #guide-level-explanation++Let's see an example for the same TIR program but in different syntax.++## Existing Syntax++```Python+from tvm import tir+# ^ here tir is not related to the script but we need to import it. Otherwise there are many lint errors.+from tvm.script import ty+# ^ ty is a sub-module for only type system, which makes no sense to import it global++@tvm.script.tir+class Module:+  def func(a: ty.handle, b: ty.handle) -> None:+    A = tir.match_buffer(a, [128, 128], dtype="float32")  # pylint error: tir does not have attr match_buffer+    B = tir.match_buffer(b, [128], dtype="float32")+    with tir.block([128, tir.reduce_axis(0, 128)], "C") as [i, k]:+        B[i] += A[i, k]+```++## New Syntax++```Python+from tvm.script import tir as T+# ^ there is a broadly accepted precedence in doing this in the python community:+#   from keras import backend as K++@tvm.script.ir_module                                   # it generates an IRModule+class Module:+  @T.prim_func                                          # it generates a PrimFunc explicitly

Yeah, I agree we need it in the future. I don't really care if we add it now or later, we should just make the decision explicit if we do add it.

Hzfengsy

comment created time in a day

Pull request review commentapache/tvm-rfcs

[RFC][TVMScript] New namespace for tvmscript

+- Feature Name: TVM Script Namespace+- Start Date: 2021-09-23+- RFC PR: [apache/tvm-rfcs#0036](https://github.com/apache/tvm-rfcs/pull/36)+- GitHub Issue: [apache/tvm#0000](https://github.com/apache/tvm/issues/0000)++# Summary++[summary]: #summary++This is a RFC for the new namespace and user interface for TVM script.++- Use tvm.script as the `root` namespace for all TVM script related stuff+- Use `tvm.script.tir` for `TIR`, and idiomatically import it as `T`, like Keras is usually imported as K+- To be consistent with the names of their resulting types, use+  - `tvm.script.ir_module` for `IRModule`+  - `T.prim_func` for `tir.PrimFunc`++# Motivation++[motivation]: #motivation++TVMScript is a fancy tools to write TIR in Python syntax. However, it's not fully compatible with native Python tools (e.g., pylint) because it is not a runnable program in Python.++We have following pain points:++- No Python auto-completion support+- Usually conflicts with pylint+- APIs scatter in namespaces like tvm.script, tvm.tir, tvm.script.ty+- Somewhat non-trivial to understand at first glance what the decorator generates++With the new proposal, we are able to provide type stubs that provides users with TVM scripts that work well with linting and auto-completion.++# Guide-level explanation++[guide-level-explanation]: #guide-level-explanation++Let's see an example for the same TIR program but in different syntax.++## Existing Syntax++```Python+from tvm import tir+# ^ here tir is not related to the script but we need to import it. Otherwise there are many lint errors.+from tvm.script import ty+# ^ ty is a sub-module for only type system, which makes no sense to import it global++@tvm.script.tir+class Module:+  def func(a: ty.handle, b: ty.handle) -> None:+    A = tir.match_buffer(a, [128, 128], dtype="float32")  # pylint error: tir does not have attr match_buffer+    B = tir.match_buffer(b, [128], dtype="float32")+    with tir.block([128, tir.reduce_axis(0, 128)], "C") as [i, k]:+        B[i] += A[i, k]+```++## New Syntax++```Python+from tvm.script import tir as T+# ^ there is a broadly accepted precedence in doing this in the python community:+#   from keras import backend as K++@tvm.script.ir_module                                   # it generates an IRModule+class Module:+  @T.prim_func                                          # it generates a PrimFunc explicitly+  def func(a: T.handle, b: T.handle):                   # return type is not necessary for PrimFunc+    A = T.match_buffer(a, [128, 128], dtype="float32")  # no pylint errors for match_buffer+    B = T.match_buffer(b, [128], dtype="float32")+    with T.block([128, T.reduce_axis(0, 128)], "C") as [i, k]:+        B[i] += A[i, k]+```++# Reference-level explanation++[reference-level-explanation]: #reference-level-explanation++Pylint and Python auto-completion will look the symbols (function definitions) in the module (e.g. `tvm.script.tir`). Just write (or generate) a concrete function in the module, then can enable auto-completion and pass Pylint checks.++# Drawbacks++[drawbacks]: #drawbacks++Here are some existing works based on current TVM Script syntax. It need a huge refactor to migrate it to the new one.

Is there a way we could deprecate but not remove the old syntax. It might make it easier to transition. (Though it might be impossible because tir is changing from a function to a module. Stackoverflow suggests some very hacky solutions).

Hzfengsy

comment created time in 2 days

Pull request review commentapache/tvm-rfcs

[RFC][TVMScript] New namespace for tvmscript

+- Feature Name: TVM Script Namespace+- Start Date: 2021-09-23+- RFC PR: [apache/tvm-rfcs#0036](https://github.com/apache/tvm-rfcs/pull/36)+- GitHub Issue: [apache/tvm#0000](https://github.com/apache/tvm/issues/0000)++# Summary++[summary]: #summary++This is a RFC for the new namespace and user interface for TVM script.++- Use tvm.script as the `root` namespace for all TVM script related stuff+- Use `tvm.script.tir` for `TIR`, and idiomatically import it as `T`, like Keras is usually imported as K+- To be consistent with the names of their resulting types, use+  - `tvm.script.ir_module` for `IRModule`+  - `T.prim_func` for `tir.PrimFunc`++# Motivation++[motivation]: #motivation++TVMScript is a fancy tools to write TIR in Python syntax. However, it's not fully compatible with native Python tools (e.g., pylint) because it is not a runnable program in Python.++We have following pain points:++- No Python auto-completion support+- Usually conflicts with pylint+- APIs scatter in namespaces like tvm.script, tvm.tir, tvm.script.ty+- Somewhat non-trivial to understand at first glance what the decorator generates++With the new proposal, we are able to provide type stubs that provides users with TVM scripts that work well with linting and auto-completion.++# Guide-level explanation++[guide-level-explanation]: #guide-level-explanation++Let's see an example for the same TIR program but in different syntax.++## Existing Syntax++```Python+from tvm import tir+# ^ here tir is not related to the script but we need to import it. Otherwise there are many lint errors.+from tvm.script import ty+# ^ ty is a sub-module for only type system, which makes no sense to import it global++@tvm.script.tir+class Module:+  def func(a: ty.handle, b: ty.handle) -> None:+    A = tir.match_buffer(a, [128, 128], dtype="float32")  # pylint error: tir does not have attr match_buffer+    B = tir.match_buffer(b, [128], dtype="float32")+    with tir.block([128, tir.reduce_axis(0, 128)], "C") as [i, k]:+        B[i] += A[i, k]+```++## New Syntax++```Python+from tvm.script import tir as T+# ^ there is a broadly accepted precedence in doing this in the python community:+#   from keras import backend as K++@tvm.script.ir_module                                   # it generates an IRModule+class Module:+  @T.prim_func                                          # it generates a PrimFunc explicitly

Current we do not require decorators for functions within a class decorated with tvm.script.tir. Are you suggesting we change this so all functions need a decorator?

Hzfengsy

comment created time in 2 days

PullRequestReviewEvent
PullRequestReviewEvent

pull request commentapache/tvm-rfcs

Migrating Target Attributes to IRModule

I think this is a good and necessary change. Thanks!

I agree with Andrew that it would be better to keep these parameters as a separate object. I think this makes a more consistent interface. We are all ready passing targets separately from the module, so it makes more logical sense to keep "RuntimeConfig" (or whatever you want to call it) separate. I'm also not opposed to moving target and "RuntimeConfig" into the IRModule. Passing around all these separate but related objects can be a pain and I think we are moving away from that.

Mousius

comment created time in 4 days

PullRequestReviewEvent
PullRequestReviewEvent

PR opened apache/tvm

[TIR] Add conversion from FloatImm to float in Python

This method matches the IntImm method for converting from IntImm to int.

@comaniac @jwfromm @masahi

+3 -0

0 comment

1 changed file

pr created time in 11 days

create barnchtkonolige/incubator-tvm

branch : float_floatimm

created branch time in 11 days

PullRequestReviewEvent

Pull request review commentapache/tvm

[microTVM][AutoTVM] Fix autotvm bug and tests

     do_fork=True,     build_func=tvm.micro.autotvm_build_func, )-runner = tvm.autotvm.LocalRunner(number=1, repeat=1, timeout=0, module_loader=module_loader)+runner = tvm.autotvm.LocalRunner(number=1, repeat=1, module_loader=module_loader)

Maybe set timeout=100 to be consistent here?

mehrdadh

comment created time in 11 days

Pull request review commentapache/tvm

[microTVM][AutoTVM] Fix autotvm bug and tests

         n_trial=num_trials,         measure_option=measure_option,         callbacks=[-            tvm.autotvm.callback.log_to_file("microtvm_autotune.log"),+            tvm.autotvm.callback.log_to_file("microtvm_autotune.log.txt"),

Why the double extension here?

mehrdadh

comment created time in 11 days

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentapache/tvm

[Autoscheduler] Reduce task weight coercion overhead

 runtime::TVMRetValue ReflectionVTable::GetAttr(Object* self, const String& field     }   }   if (!success) {-    LOG(FATAL) << "AttributeError: " << self->GetTypeKey() << " object has no attributed "-               << getter.skey;

It seems like the issue is various python functions repeatedly calling getattr on TVM Objects. Could we have a separate GetAttr for python that does not collect a backtrace? Or we could add HasAttr and have the python code check that the attr exists before calling getattr.

petersalas

comment created time in 12 days

PullRequestReviewEvent

Pull request review commentapache/tvm

[Autoscheduler] Reduce task weight coercion overhead

 runtime::TVMRetValue ReflectionVTable::GetAttr(Object* self, const String& field     }   }   if (!success) {-    LOG(FATAL) << "AttributeError: " << self->GetTypeKey() << " object has no attributed "-               << getter.skey;

I think we should keep the LOG(FATAL). It is used in a lot of places. Instead, we should fix where ever is calling GetAttr a lot.

petersalas

comment created time in 12 days

PullRequestReviewEvent
PullRequestReviewEvent

pull request commentoctoml/synr

Support While Node

@Hzfengsy I've published the 0.4 release that includes this PR. Note that it also adds local function support, decorator support and global and non local support.

Hzfengsy

comment created time in 12 days

release octoml/synr

v0.4.0

released time in 12 days

created tagoctoml/synr

tagv0.4.0

A library for syntactically rewriting Python programs, pronounced (sinner).

created time in 12 days

push eventoctoml/synr

Tristan Konolige

commit sha 6a552603aa45738b092dacce48cf855639d3d619

Version 0.4.0

view details

push time in 12 days

Pull request review commentapache/tvm

[Debug] iters_num and repeat were added to debug executor init args

 class GraphModuleDebug(graph_executor.GraphModule):     dump_root : str         To select which folder the outputs should be kept.         None will make a temp folder in /tmp/tvmdbg<rand_string> and does the dumping+    number : int+        Number of times to run the inner loop of the timing code. This inner loop is run in+        between the timer starting and stopping. In order to amortize any timing overhead,+        `number` should be increased when the runtime of the function is small (less than a 1/10+        of a millisecond).+    repeat : int+        Number of times to run the outer loop of the timing code (see above). The output will
        Number of times to run the outer loop of the timing code. The output will
vvchernov

comment created time in 15 days

Pull request review commentapache/tvm

[Debug] iters_num and repeat were added to debug executor init args

 How to use Debugger? ::      from tvm.contrib.debugger import debug_executor as graph_executor-    m = graph_executor.create(graph, lib, dev, dump_root="/tmp/tvmdbg")+    m = graph_executor.create(graph, lib, dev, dump_root="/tmp/tvmdbg", iters_num=10, repeat=1)

Could you add min_repeat_ms here.

vvchernov

comment created time in 15 days

PullRequestReviewEvent
PullRequestReviewEvent