Skip to content

Commit b9765c9

Browse files
committed
chore: revert attribute access to first use
1 parent b8710b5 commit b9765c9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

numba_cuda/numba/cuda/cudadrv/devices.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@
2222

2323

2424
class _DeviceList:
25-
def __init__(self):
26-
self.lst = [
25+
@property
26+
@functools.cache
27+
def lst(self):
28+
return [
2729
_DeviceContextManager(driver.get_device(devid))
2830
for devid in range(driver.get_device_count())
2931
]

0 commit comments

Comments
 (0)