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 2020/07/03 03:42:47 UTC

[GitHub] [incubator-tvm] windclarion opened a new pull request #5988: [TARGET] each option of target str should only contain one '='

windclarion opened a new pull request #5988:
URL: https://github.com/apache/incubator-tvm/pull/5988


   src/target/target_id.cc ParseAttrsFromRawString L222:
   if ((pos = FindUniqueSubstr(s, "=")) != -1)
   require option contains only one '='
   
   The CHECK code in FindUniqueSubstr will cause build fail.
   
   Signed-off-by: windclarion <wi...@gmail.com>
   
   
   


----------------------------------------------------------------
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] [incubator-tvm] windclarion commented on a change in pull request #5988: [TARGET] each option of target str should only contain one '='

Posted by GitBox <gi...@apache.org>.
windclarion commented on a change in pull request #5988:
URL: https://github.com/apache/incubator-tvm/pull/5988#discussion_r449409823



##########
File path: python/tvm/target/target.py
##########
@@ -194,21 +194,22 @@ def arm_cpu(model='unknown', options=None):
         Additional options
     """
     trans_table = {
-        "pixel2":    ["-model=snapdragon835", "-target=arm64-linux-android -mattr=+neon"],
-        "mate10":    ["-model=kirin970", "-target=arm64-linux-android -mattr=+neon"],
-        "mate10pro": ["-model=kirin970", "-target=arm64-linux-android -mattr=+neon"],
-        "p20":       ["-model=kirin970", "-target=arm64-linux-android -mattr=+neon"],
-        "p20pro":    ["-model=kirin970", "-target=arm64-linux-android -mattr=+neon"],
-        "rasp3b":    ["-model=bcm2837", "-target=armv7l-linux-gnueabihf -mattr=+neon"],
-        "rasp4b":    ["-model=bcm2711", "-target=arm-linux-gnueabihf -mattr=+neon"],
-        "rk3399":    ["-model=rk3399", "-target=aarch64-linux-gnu -mattr=+neon"],
-        "pynq":      ["-model=pynq", "-target=armv7a-linux-eabi -mattr=+neon"],
-        "ultra96":   ["-model=ultra96", "-target=aarch64-linux-gnu -mattr=+neon"],
+        "pixel2":    ["-model=snapdragon835", "-target=arm64-linux-android", "-mattr=+neon"],
+        "mate10":    ["-model=kirin970", "-target=arm64-linux-android", "-mattr=+neon"],
+        "mate10pro": ["-model=kirin970", "-target=arm64-linux-android", "-mattr=+neon"],
+        "p20":       ["-model=kirin970", "-target=arm64-linux-android", "-mattr=+neon"],
+        "p20pro":    ["-model=kirin970", "-target=arm64-linux-android", "-mattr=+neon"],
+        "rasp3b":    ["-model=bcm2837", "-target=armv7l-linux-gnueabihf", "-mattr=+neon"],
+        "rasp4b":    ["-model=bcm2711", "-target=arm-linux-gnueabihf", "-mattr=+neon"],
+        "rk3399":    ["-model=rk3399", "-target=aarch64-linux-gnu", "-mattr=+neon"],
+        "pynq":      ["-model=pynq", "-target=armv7a-linux-eabi", "-mattr=+neon"],
+        "ultra96":   ["-model=ultra96", "-target=aarch64-linux-gnu", "-mattr=+neon"],
     }
     pre_defined_opt = trans_table.get(model, ["-model=%s" % model])
 
     opts = ["-device=arm_cpu"] + pre_defined_opt
     opts = _merge_opts(opts, options)
+    print('opts=', opts)

Review comment:
       sorry! 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] [incubator-tvm] junrushao1994 commented on pull request #5988: [TARGET] each option of target str should only contain one '='

Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on pull request #5988:
URL: https://github.com/apache/incubator-tvm/pull/5988#issuecomment-654030410


   @windclarion Looks like a flaky test. Could you file an empty commit using `git commit --allow-empty -m "retrigger"` to retrigger the CI?


----------------------------------------------------------------
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] [incubator-tvm] junrushao1994 commented on pull request #5988: [TARGET] each option of target str should only contain one '='

Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on pull request #5988:
URL: https://github.com/apache/incubator-tvm/pull/5988#issuecomment-655629900


   The flaky test is resolved in #6014 :-)


----------------------------------------------------------------
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] [incubator-tvm] windclarion edited a comment on pull request #5988: [TARGET] each option of target str should only contain one '='

Posted by GitBox <gi...@apache.org>.
windclarion edited a comment on pull request #5988:
URL: https://github.com/apache/incubator-tvm/pull/5988#issuecomment-654661434


   today's test is flaky, I always failed at the unexpected position, and I don't know how can I cause the fail


----------------------------------------------------------------
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] [incubator-tvm] windclarion commented on pull request #5988: [TARGET] each option of target str should only contain one '='

Posted by GitBox <gi...@apache.org>.
windclarion commented on pull request #5988:
URL: https://github.com/apache/incubator-tvm/pull/5988#issuecomment-654661434


   today's test is flaky, I always failed at unexpected position


----------------------------------------------------------------
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] [incubator-tvm] junrushao1994 commented on pull request #5988: [TARGET] each option of target str should only contain one '='

Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on pull request #5988:
URL: https://github.com/apache/incubator-tvm/pull/5988#issuecomment-654556337


   @windclarion use pytest.raises: https://stackoverflow.com/questions/23337471/how-to-properly-assert-that-an-exception-gets-raised-in-pytest


----------------------------------------------------------------
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] [incubator-tvm] windclarion commented on pull request #5988: [TARGET] each option of target str should only contain one '='

Posted by GitBox <gi...@apache.org>.
windclarion commented on pull request #5988:
URL: https://github.com/apache/incubator-tvm/pull/5988#issuecomment-653973990


   done!  old code works ok before "[Target] Migrate data structure of TargetNode (#5960)", the commit add a requirement in src/target/target_id.cc. FindUniqueSubstr require options string has only one '=', we didn't force the limit before that commit.
   
   


----------------------------------------------------------------
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] [incubator-tvm] junrushao1994 commented on pull request #5988: [TARGET] each option of target str should only contain one '='

Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on pull request #5988:
URL: https://github.com/apache/incubator-tvm/pull/5988#issuecomment-655202281


   I see. There is a flaky test in the recent week: https://github.com/apache/incubator-tvm/issues/6009. Don't worry, let's wait until it is 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] [incubator-tvm] windclarion commented on pull request #5988: [TARGET] each option of target str should only contain one '='

Posted by GitBox <gi...@apache.org>.
windclarion commented on pull request #5988:
URL: https://github.com/apache/incubator-tvm/pull/5988#issuecomment-654601466


   @junrushao1994  What I have said  maybe not very clear,  I mean  I can't catch a exception in python code, because C++ CHECK just abort, the abort function didn't throw a exception.


----------------------------------------------------------------
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] [incubator-tvm] siju-samuel commented on a change in pull request #5988: [TARGET] each option of target str should only contain one '='

Posted by GitBox <gi...@apache.org>.
siju-samuel commented on a change in pull request #5988:
URL: https://github.com/apache/incubator-tvm/pull/5988#discussion_r449361801



##########
File path: python/tvm/target/target.py
##########
@@ -194,21 +194,22 @@ def arm_cpu(model='unknown', options=None):
         Additional options
     """
     trans_table = {
-        "pixel2":    ["-model=snapdragon835", "-target=arm64-linux-android -mattr=+neon"],
-        "mate10":    ["-model=kirin970", "-target=arm64-linux-android -mattr=+neon"],
-        "mate10pro": ["-model=kirin970", "-target=arm64-linux-android -mattr=+neon"],
-        "p20":       ["-model=kirin970", "-target=arm64-linux-android -mattr=+neon"],
-        "p20pro":    ["-model=kirin970", "-target=arm64-linux-android -mattr=+neon"],
-        "rasp3b":    ["-model=bcm2837", "-target=armv7l-linux-gnueabihf -mattr=+neon"],
-        "rasp4b":    ["-model=bcm2711", "-target=arm-linux-gnueabihf -mattr=+neon"],
-        "rk3399":    ["-model=rk3399", "-target=aarch64-linux-gnu -mattr=+neon"],
-        "pynq":      ["-model=pynq", "-target=armv7a-linux-eabi -mattr=+neon"],
-        "ultra96":   ["-model=ultra96", "-target=aarch64-linux-gnu -mattr=+neon"],
+        "pixel2":    ["-model=snapdragon835", "-target=arm64-linux-android", "-mattr=+neon"],
+        "mate10":    ["-model=kirin970", "-target=arm64-linux-android", "-mattr=+neon"],
+        "mate10pro": ["-model=kirin970", "-target=arm64-linux-android", "-mattr=+neon"],
+        "p20":       ["-model=kirin970", "-target=arm64-linux-android", "-mattr=+neon"],
+        "p20pro":    ["-model=kirin970", "-target=arm64-linux-android", "-mattr=+neon"],
+        "rasp3b":    ["-model=bcm2837", "-target=armv7l-linux-gnueabihf", "-mattr=+neon"],
+        "rasp4b":    ["-model=bcm2711", "-target=arm-linux-gnueabihf", "-mattr=+neon"],
+        "rk3399":    ["-model=rk3399", "-target=aarch64-linux-gnu", "-mattr=+neon"],
+        "pynq":      ["-model=pynq", "-target=armv7a-linux-eabi", "-mattr=+neon"],
+        "ultra96":   ["-model=ultra96", "-target=aarch64-linux-gnu", "-mattr=+neon"],
     }
     pre_defined_opt = trans_table.get(model, ["-model=%s" % model])
 
     opts = ["-device=arm_cpu"] + pre_defined_opt
     opts = _merge_opts(opts, options)
+    print('opts=', opts)

Review comment:
       Remove the print statement




----------------------------------------------------------------
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] [incubator-tvm] windclarion commented on pull request #5988: [TARGET] each option of target str should only contain one '='

Posted by GitBox <gi...@apache.org>.
windclarion commented on pull request #5988:
URL: https://github.com/apache/incubator-tvm/pull/5988#issuecomment-654658063


   @junrushao1994  I  add a  small test which just test target wether can be created, and I just check the target shouldn't be None.


----------------------------------------------------------------
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] [incubator-tvm] junrushao1994 commented on pull request #5988: [TARGET] each option of target str should only contain one '='

Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on pull request #5988:
URL: https://github.com/apache/incubator-tvm/pull/5988#issuecomment-653957802


   Ah I see, I am a bit surprised the typo is not found before. BTW, please rebase to master, and change “-target” to “-mtriple”. Thanks!


----------------------------------------------------------------
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] [incubator-tvm] ZihengJiang commented on pull request #5988: [TARGET] each option of target str should only contain one '='

Posted by GitBox <gi...@apache.org>.
ZihengJiang commented on pull request #5988:
URL: https://github.com/apache/incubator-tvm/pull/5988#issuecomment-655330751


   @windclarion Could you try to build a small program like`A+B` with every target for testing the code generation? ( you can jump some target like cuda if it requires extra efforts)


----------------------------------------------------------------
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] [incubator-tvm] windclarion edited a comment on pull request #5988: [TARGET] each option of target str should only contain one '='

Posted by GitBox <gi...@apache.org>.
windclarion edited a comment on pull request #5988:
URL: https://github.com/apache/incubator-tvm/pull/5988#issuecomment-654658063


   @junrushao1994  I  add a  small test which just test target wether can be created, and I just make sure the target shouldn't be None.


----------------------------------------------------------------
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] [incubator-tvm] windclarion commented on pull request #5988: [TARGET] each option of target str should only contain one '='

Posted by GitBox <gi...@apache.org>.
windclarion commented on pull request #5988:
URL: https://github.com/apache/incubator-tvm/pull/5988#issuecomment-655847989


   @ZihengJiang many other tests has tested tvm.build, ex. tests\python\integration\test_reduce.py test_reduce_prims Line64 has checked metal, vulkan, cuda, opencl, rocm


----------------------------------------------------------------
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] [incubator-tvm] windclarion edited a comment on pull request #5988: [TARGET] each option of target str should only contain one '='

Posted by GitBox <gi...@apache.org>.
windclarion edited a comment on pull request #5988:
URL: https://github.com/apache/incubator-tvm/pull/5988#issuecomment-654658063


   @junrushao1994  I  add a  small test which just test target whether can be created, and I just make sure the target shouldn't be None.


----------------------------------------------------------------
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] [incubator-tvm] windclarion commented on pull request #5988: [TARGET] each option of target str should only contain one '='

Posted by GitBox <gi...@apache.org>.
windclarion commented on pull request #5988:
URL: https://github.com/apache/incubator-tvm/pull/5988#issuecomment-654541003


   @ZihengJiang I try to add test, but if I feed the option with a string which contains two '=', target_id.cc  FindUniqueSubstr  CHECK will abort,  so  I don't know how can I test the abort operation, it's not a exception which I can catch, it's just abort. Can you give me   some advice or tell me similar test file which can test the CHECK?


----------------------------------------------------------------
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] [incubator-tvm] junrushao1994 commented on pull request #5988: [TARGET] each option of target str should only contain one '='

Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on pull request #5988:
URL: https://github.com/apache/incubator-tvm/pull/5988#issuecomment-654992058


   Yeah seems like another flaky test...Could you re-trigger? Thanks!


----------------------------------------------------------------
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] [incubator-tvm] ZihengJiang merged pull request #5988: [TARGET] each option of target str should only contain one '='

Posted by GitBox <gi...@apache.org>.
ZihengJiang merged pull request #5988:
URL: https://github.com/apache/incubator-tvm/pull/5988


   


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