yzhliu commented on a change in pull request #17214: [tvmop] support cuda
multi-arch compilation
URL: https://github.com/apache/incubator-mxnet/pull/17214#discussion_r363440181
##########
File path: contrib/tvmop/compile.py
##########
@@ -105,18 +105,13 @@ def get_cuda_arch(arch):
return arch.split(';')
# the arch string contains '-arch=sm_xx'
+ archs = []
flags = arch.split()
for flag in flags:
- if flag.startswith('-arch='):
- return flag[len('-arch='):]
+ if flag.startswith('-gencode') or flag.startswith('arch='):
Review comment:
an example input arch string would be
`-gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35
-gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52
-gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61
-gencode arch=compute_70,code=sm_70 -gencode
arch=compute_75,code=[sm_75,compute_75] --fatbin-options -compress-all`
L104 has semicolon ; after "gencode", I believe it's for single arch
compilation @reminisce if I understand correctly.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services