Re: [PR] [Relax] Allow R.Prim('bool') in relax::If and assert_op [tvm]

2024-04-03 Thread via GitHub
quic-sanirudh commented on PR #16642: URL: https://github.com/apache/tvm/pull/16642#issuecomment-2033631336 > Ooh, interesting. I wasn't aware that `R.layout_transform` was implemented in terms of `Schedule.layout_transform`. Can you take a look at #16832 and see if it resolves your issue?

Re: [PR] [Relax] Allow R.Prim('bool') in relax::If and assert_op [tvm]

2024-04-02 Thread via GitHub
Lunderberg commented on PR #16642: URL: https://github.com/apache/tvm/pull/16642#issuecomment-2032858841 Ooh, interesting. I wasn't aware that `R.layout_transform` was implemented in terms of `Schedule.layout_transform`. Can you take a look at https://github.com/apache/tvm/pull/16832 and

Re: [PR] [Relax] Allow R.Prim('bool') in relax::If and assert_op [tvm]

2024-04-02 Thread via GitHub
quic-sanirudh commented on PR #16642: URL: https://github.com/apache/tvm/pull/16642#issuecomment-2032679685 @Lunderberg After this pass introduced support for computing struct_info for PrimFuncs, I'm seeing a case where a primfunc whose output buffer is modified with the

Re: [PR] [Relax] Allow R.Prim('bool') in relax::If and assert_op [tvm]

2024-03-28 Thread via GitHub
Lunderberg merged PR #16642: URL: https://github.com/apache/tvm/pull/16642 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail:

Re: [PR] [Relax] Allow R.Prim('bool') in relax::If and assert_op [tvm]

2024-03-26 Thread via GitHub
Lunderberg commented on PR #16642: URL: https://github.com/apache/tvm/pull/16642#issuecomment-2020783444 Rebased onto main to resolve a merge conflict. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to

Re: [PR] [Relax] Allow R.Prim('bool') in relax::If and assert_op [tvm]

2024-03-22 Thread via GitHub
Lunderberg commented on code in PR #16642: URL: https://github.com/apache/tvm/pull/16642#discussion_r1535744877 ## src/tir/ir/function.cc: ## @@ -21,12 +21,52 @@ * \file src/tir/ir/function.cc * \brief The function data structure. */ +#include #include +#include

Re: [PR] [Relax] Allow R.Prim('bool') in relax::If and assert_op [tvm]

2024-03-21 Thread via GitHub
slyubomirsky commented on PR #16642: URL: https://github.com/apache/tvm/pull/16642#issuecomment-2013697225 Thank you for your changes, I am very excited to have purity checking and more accurate StructInfo for PrimFuncs. I had one question remaining about the inference for argument types,

Re: [PR] [Relax] Allow R.Prim('bool') in relax::If and assert_op [tvm]

2024-03-21 Thread via GitHub
slyubomirsky commented on code in PR #16642: URL: https://github.com/apache/tvm/pull/16642#discussion_r1534643145 ## tests/python/relax/test_transform_compute_prim_value.py: ## @@ -76,5 +76,29 @@ def compute_symbolic_expr(N: T.int64) -> T.bool: T.ret(N % 16 == 0)

Re: [PR] [Relax] Allow R.Prim('bool') in relax::If and assert_op [tvm]

2024-03-21 Thread via GitHub
slyubomirsky commented on code in PR #16642: URL: https://github.com/apache/tvm/pull/16642#discussion_r1534634573 ## src/tir/ir/function.cc: ## @@ -21,12 +21,52 @@ * \file src/tir/ir/function.cc * \brief The function data structure. */ +#include #include +#include

Re: [PR] [Relax] Allow R.Prim('bool') in relax::If and assert_op [tvm]

2024-03-21 Thread via GitHub
slyubomirsky commented on code in PR #16642: URL: https://github.com/apache/tvm/pull/16642#discussion_r1534634573 ## src/tir/ir/function.cc: ## @@ -21,12 +21,52 @@ * \file src/tir/ir/function.cc * \brief The function data structure. */ +#include #include +#include

Re: [PR] [Relax] Allow R.Prim('bool') in relax::If and assert_op [tvm]

2024-03-13 Thread via GitHub
Lunderberg commented on PR #16642: URL: https://github.com/apache/tvm/pull/16642#issuecomment-1995945407 The additional test case has been added, and fixed, so this PR is ready for review/merge. -- This is an automated message from the Apache Git Service. To respond to the message,

Re: [PR] [Relax] Allow R.Prim('bool') in relax::If and assert_op [tvm]

2024-03-11 Thread via GitHub
Lunderberg commented on PR #16642: URL: https://github.com/apache/tvm/pull/16642#issuecomment-1989472731 This PR needs an additional test case before merging. On the main branch, the following IRModule is valid. However, with this PR, it fails during parsing. ```python

Re: [PR] [Relax] Allow R.Prim('bool') in relax::If and assert_op [tvm]

2024-03-08 Thread via GitHub
Lunderberg commented on PR #16642: URL: https://github.com/apache/tvm/pull/16642#issuecomment-1986125550 > That's a good idea. What would be the analogue to such annotations in a PrimFunc? Do we think we need it? (Apologies, missed the notification on this one.) For a `PrimFunc`, it

Re: [PR] [Relax] Allow R.Prim('bool') in relax::If and assert_op [tvm]

2024-03-01 Thread via GitHub
slyubomirsky commented on PR #16642: URL: https://github.com/apache/tvm/pull/16642#issuecomment-1974030446 That's a good idea. What would be the analogue to such annotations in a PrimFunc? Do we think we need it? -- This is an automated message from the Apache Git Service. To respond to

Re: [PR] [Relax] Allow R.Prim('bool') in relax::If and assert_op [tvm]

2024-03-01 Thread via GitHub
Lunderberg commented on PR #16642: URL: https://github.com/apache/tvm/pull/16642#issuecomment-197283 > Do you think it's necessary to have an override to assert a PrimFunc is pure? I think I prefer having the overrides at an individual operator level, rather than on the function

Re: [PR] [Relax] Allow R.Prim('bool') in relax::If and assert_op [tvm]

2024-02-29 Thread via GitHub
slyubomirsky commented on PR #16642: URL: https://github.com/apache/tvm/pull/16642#issuecomment-1972363867 Excellent, I'm glad to see an analysis for PrimFunc purity. Do you think it's necessary to have an override to assert one is pure? It's doubtful that we would need it right now but it

Re: [PR] [Relax] Allow R.Prim('bool') in relax::If and assert_op [tvm]

2024-02-28 Thread via GitHub
Lunderberg commented on code in PR #16642: URL: https://github.com/apache/tvm/pull/16642#discussion_r1507068274 ## src/relax/transform/compute_prim_value.cc: ## @@ -0,0 +1,94 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license

Re: [PR] [Relax] Allow R.Prim('bool') in relax::If and assert_op [tvm]

2024-02-28 Thread via GitHub
Lunderberg commented on code in PR #16642: URL: https://github.com/apache/tvm/pull/16642#discussion_r1506827430 ## tests/python/relax/test_transform_compute_prim_value.py: ## @@ -76,5 +76,29 @@ def compute_symbolic_expr(N: T.int64) -> T.bool: T.ret(N % 16 == 0)

Re: [PR] [Relax] Allow R.Prim('bool') in relax::If and assert_op [tvm]

2024-02-28 Thread via GitHub
slyubomirsky commented on code in PR #16642: URL: https://github.com/apache/tvm/pull/16642#discussion_r1506785821 ## tests/python/relax/test_transform_compute_prim_value.py: ## @@ -76,5 +76,29 @@ def compute_symbolic_expr(N: T.int64) -> T.bool: T.ret(N % 16 == 0)

Re: [PR] [Relax] Allow R.Prim('bool') in relax::If and assert_op [tvm]

2024-02-28 Thread via GitHub
slyubomirsky commented on code in PR #16642: URL: https://github.com/apache/tvm/pull/16642#discussion_r1506784633 ## python/tvm/relax/transform/transform.py: ## @@ -463,6 +463,16 @@ def KillAfterLastUse() -> tvm.ir.transform.Pass: return _ffi_api.KillAfterLastUse() #

Re: [PR] [Relax] Allow R.Prim('bool') in relax::If and assert_op [tvm]

2024-02-27 Thread via GitHub
Lunderberg commented on code in PR #16642: URL: https://github.com/apache/tvm/pull/16642#discussion_r1505082724 ## python/tvm/relax/transform/transform.py: ## @@ -463,6 +463,16 @@ def KillAfterLastUse() -> tvm.ir.transform.Pass: return _ffi_api.KillAfterLastUse() # type:

Re: [PR] [Relax] Allow R.Prim('bool') in relax::If and assert_op [tvm]

2024-02-27 Thread via GitHub
slyubomirsky commented on code in PR #16642: URL: https://github.com/apache/tvm/pull/16642#discussion_r1505049818 ## python/tvm/relax/transform/transform.py: ## @@ -463,6 +463,16 @@ def KillAfterLastUse() -> tvm.ir.transform.Pass: return _ffi_api.KillAfterLastUse() #

Re: [PR] [Relax] Allow R.Prim('bool') in relax::If and assert_op [tvm]

2024-02-27 Thread via GitHub
slyubomirsky commented on code in PR #16642: URL: https://github.com/apache/tvm/pull/16642#discussion_r1505049818 ## python/tvm/relax/transform/transform.py: ## @@ -463,6 +463,16 @@ def KillAfterLastUse() -> tvm.ir.transform.Pass: return _ffi_api.KillAfterLastUse() #

Re: [PR] [Relax] Allow R.Prim('bool') in relax::If and assert_op [tvm]

2024-02-27 Thread via GitHub
slyubomirsky commented on code in PR #16642: URL: https://github.com/apache/tvm/pull/16642#discussion_r1505049818 ## python/tvm/relax/transform/transform.py: ## @@ -463,6 +463,16 @@ def KillAfterLastUse() -> tvm.ir.transform.Pass: return _ffi_api.KillAfterLastUse() #

Re: [PR] [Relax] Allow R.Prim('bool') in relax::If and assert_op [tvm]

2024-02-27 Thread via GitHub
Lunderberg commented on code in PR #16642: URL: https://github.com/apache/tvm/pull/16642#discussion_r1504921950 ## python/tvm/relax/transform/transform.py: ## @@ -463,6 +463,16 @@ def KillAfterLastUse() -> tvm.ir.transform.Pass: return _ffi_api.KillAfterLastUse() # type:

Re: [PR] [Relax] Allow R.Prim('bool') in relax::If and assert_op [tvm]

2024-02-27 Thread via GitHub
slyubomirsky commented on code in PR #16642: URL: https://github.com/apache/tvm/pull/16642#discussion_r1504800879 ## src/relax/transform/compute_prim_value.cc: ## @@ -0,0 +1,94 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license

Re: [PR] [Relax] Allow R.Prim('bool') in relax::If and assert_op [tvm]

2024-02-27 Thread via GitHub
slyubomirsky commented on code in PR #16642: URL: https://github.com/apache/tvm/pull/16642#discussion_r1504800473 ## python/tvm/relax/transform/transform.py: ## @@ -463,6 +463,16 @@ def KillAfterLastUse() -> tvm.ir.transform.Pass: return _ffi_api.KillAfterLastUse() #

Re: [PR] [Relax] Allow R.Prim('bool') in relax::If and assert_op [tvm]

2024-02-27 Thread via GitHub
Lunderberg commented on code in PR #16642: URL: https://github.com/apache/tvm/pull/16642#discussion_r1504424495 ## src/relax/transform/compute_prim_value.cc: ## @@ -0,0 +1,94 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license

Re: [PR] [Relax] Allow R.Prim('bool') in relax::If and assert_op [tvm]

2024-02-27 Thread via GitHub
Lunderberg commented on code in PR #16642: URL: https://github.com/apache/tvm/pull/16642#discussion_r1504405971 ## python/tvm/relax/transform/transform.py: ## @@ -463,6 +463,16 @@ def KillAfterLastUse() -> tvm.ir.transform.Pass: return _ffi_api.KillAfterLastUse() # type:

Re: [PR] [Relax] Allow R.Prim('bool') in relax::If and assert_op [tvm]

2024-02-26 Thread via GitHub
slyubomirsky commented on code in PR #16642: URL: https://github.com/apache/tvm/pull/16642#discussion_r1503443020 ## src/relax/transform/compute_prim_value.cc: ## @@ -0,0 +1,94 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license

Re: [PR] [Relax] Allow R.Prim('bool') in relax::If and assert_op [tvm]

2024-02-26 Thread via GitHub
slyubomirsky commented on code in PR #16642: URL: https://github.com/apache/tvm/pull/16642#discussion_r1503442355 ## python/tvm/relax/transform/transform.py: ## @@ -463,6 +463,16 @@ def KillAfterLastUse() -> tvm.ir.transform.Pass: return _ffi_api.KillAfterLastUse() #