You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/03/04 15:01:11 UTC

[GitHub] [tvm] masahi opened a new pull request #7591: [SPIRV] Support Bool buffer argument

masahi opened a new pull request #7591:
URL: https://github.com/apache/tvm/pull/7591


   @tqchen 


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] masahi commented on a change in pull request #7591: [SPIRV] Support Bool buffer argument

Posted by GitBox <gi...@apache.org>.
masahi commented on a change in pull request #7591:
URL: https://github.com/apache/tvm/pull/7591#discussion_r587749227



##########
File path: tests/python/unittest/test_target_codegen_spirv.py
##########
@@ -0,0 +1,78 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+import tvm
+import tvm.testing
+from tvm import te
+from tvm.topi.math import cast
+import numpy as np
+
+
+tx = te.thread_axis("threadIdx.x")
+ty = te.thread_axis("threadIdx.y")

Review comment:
       sure no problem, it was just copy-pasted from other test https://github.com/apache/tvm/blob/e561007f0c330e3d14c2bc8a3ef40fb741db9004/tests/python/unittest/test_target_codegen_rocm.py#L23-L26
   
   fixed.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] tqchen commented on pull request #7591: [SPIRV] Support Bool buffer argument

Posted by GitBox <gi...@apache.org>.
tqchen commented on pull request #7591:
URL: https://github.com/apache/tvm/pull/7591#issuecomment-791063173


   Thanks @masahi @jwfromm 


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] masahi commented on a change in pull request #7591: [SPIRV] Support Bool buffer argument

Posted by GitBox <gi...@apache.org>.
masahi commented on a change in pull request #7591:
URL: https://github.com/apache/tvm/pull/7591#discussion_r587748463



##########
File path: src/target/spirv/codegen_spirv.cc
##########
@@ -46,6 +46,9 @@ std::vector<uint32_t> CodeGenSPIRV::BuildFunction(const PrimFunc& f, const std::
         auto* prim = ptr->element_type.as<PrimTypeNode>();
         ICHECK(prim);
         DataType value_type = prim->dtype;
+        if (value_type == DataType::UInt(1)) {

Review comment:
       done




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] masahi commented on pull request #7591: [SPIRV] Support Bool buffer argument

Posted by GitBox <gi...@apache.org>.
masahi commented on pull request #7591:
URL: https://github.com/apache/tvm/pull/7591#issuecomment-791050434


   @tqchen please have a look, I'll update https://github.com/apache/tvm/pull/7572 after this is merged, to enable the cumsum test on boolean input.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] tqchen merged pull request #7591: [SPIRV] Support Bool buffer argument

Posted by GitBox <gi...@apache.org>.
tqchen merged pull request #7591:
URL: https://github.com/apache/tvm/pull/7591


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] tqchen commented on a change in pull request #7591: [SPIRV] Support Bool buffer argument

Posted by GitBox <gi...@apache.org>.
tqchen commented on a change in pull request #7591:
URL: https://github.com/apache/tvm/pull/7591#discussion_r587653646



##########
File path: src/target/spirv/codegen_spirv.cc
##########
@@ -46,6 +46,9 @@ std::vector<uint32_t> CodeGenSPIRV::BuildFunction(const PrimFunc& f, const std::
         auto* prim = ptr->element_type.as<PrimTypeNode>();
         ICHECK(prim);
         DataType value_type = prim->dtype;
+        if (value_type == DataType::UInt(1)) {

Review comment:
       value_storage_type
   
   Please also add a comment about us handling bool specially

##########
File path: tests/python/unittest/test_target_codegen_spirv.py
##########
@@ -0,0 +1,78 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+import tvm
+import tvm.testing
+from tvm import te
+from tvm.topi.math import cast
+import numpy as np
+
+
+tx = te.thread_axis("threadIdx.x")
+ty = te.thread_axis("threadIdx.y")

Review comment:
       it is better to keep thread axis construction in local functions




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org