MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / get_sm_version

Function get_sm_version

custom_ops/setup_ops.py:129–141  ·  view source on GitHub ↗

Get sm version of paddle.

(archs)

Source from the content-addressed store, hash-verified

127
128
129def get_sm_version(archs):
130 """
131 Get sm version of paddle.
132 """
133 arch_set = set(archs)
134 if len(arch_set) == 0:
135 try:
136 prop = paddle.device.cuda.get_device_properties()
137 cc = prop.major * 10 + prop.minor
138 arch_set.add(cc)
139 except ValueError:
140 pass
141 return list(arch_set)
142
143
144def get_nvcc_version():

Callers 2

get_gencode_flagsFunction · 0.70
setup_ops.pyFile · 0.70

Calls 1

addMethod · 0.45

Tested by

no test coverage detected