mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2026-04-23 00:17:25 +08:00
Skip building native architecture when specifying arch list (#4727)
This commit is contained in:
@@ -131,12 +131,13 @@ def get_sm_version(archs):
|
||||
Get sm version of paddle.
|
||||
"""
|
||||
arch_set = set(archs)
|
||||
try:
|
||||
prop = paddle.device.cuda.get_device_properties()
|
||||
cc = prop.major * 10 + prop.minor
|
||||
arch_set.add(cc)
|
||||
except ValueError:
|
||||
pass
|
||||
if len(arch_set) == 0:
|
||||
try:
|
||||
prop = paddle.device.cuda.get_device_properties()
|
||||
cc = prop.major * 10 + prop.minor
|
||||
arch_set.add(cc)
|
||||
except ValueError:
|
||||
pass
|
||||
return list(arch_set)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user