Get sm version of paddle.
(archs)
| 127 | |
| 128 | |
| 129 | def 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 | |
| 144 | def get_nvcc_version(): |
no test coverage detected