mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2026-04-23 00:17:25 +08:00
⚡ Bolt: Memoize module availability and device properties lookups
This commit is contained in:
@@ -552,6 +552,7 @@ def vocab_range_from_global_vocab_size(global_vocab_size: int, rank: int, world_
|
||||
return vocab_range_from_per_partition_vocab_size(per_partition_vocab_size, rank, offset=offset)
|
||||
|
||||
|
||||
@functools.lru_cache(maxsize=None)
|
||||
def get_sm_version():
|
||||
prop = paddle.device.cuda.get_device_properties()
|
||||
cc = prop.major * 10 + prop.minor
|
||||
|
||||
Reference in New Issue
Block a user