@@ -56,11 +56,6 @@ class Variable(TypedAstNode):
56
56
'stack' if memory should be allocated on the stack, represents stack arrays and scalars.
57
57
'alias' if object allows access to memory stored in another variable.
58
58
59
- memory_location: str, default: 'host'
60
- 'host' the variable can only be accessed by the CPU.
61
- 'device' the variable can only be accessed by the GPU.
62
- 'managed' the variable can be accessed by CPU and GPU and is being managed by the Cuda API (memory transfer is being done implicitly).
63
-
64
59
is_const : bool, default: False
65
60
Indicates if object is a const argument of a function.
66
61
@@ -147,10 +142,6 @@ def __init__(
147
142
raise ValueError ("memory_handling must be 'heap', 'stack' or 'alias'" )
148
143
self ._memory_handling = memory_handling
149
144
150
- if memory_location not in ('host' , 'device' , 'managed' ):
151
- raise ValueError ("memory_location must be 'host', 'device' or 'managed'" )
152
- self ._memory_location = memory_location
153
-
154
145
if not isinstance (is_const , bool ):
155
146
raise TypeError ('is_const must be a boolean.' )
156
147
self ._is_const = is_const
@@ -333,36 +324,6 @@ def cls_base(self):
333
324
"""
334
325
return self ._cls_base
335
326
336
- @property
337
- def memory_location (self ):
338
- """ Indicates whether a Variable has a dynamic size
339
- """
340
- return self ._memory_location
341
-
342
- @memory_location .setter
343
- def memory_location (self , memory_location ):
344
- if memory_location not in ('host' , 'device' , 'managed' ):
345
- raise ValueError ("memory_location must be 'host', 'device' or 'managed'" )
346
- self ._memory_location = memory_location
347
-
348
- @property
349
- def on_host (self ):
350
- """ Indicates if memory is only accessible by the CPU
351
- """
352
- return self .memory_location == 'host'
353
-
354
- @property
355
- def on_device (self ):
356
- """ Indicates if memory is only accessible by the GPU
357
- """
358
- return self .memory_location == 'device'
359
-
360
- @property
361
- def is_managed (self ):
362
- """ Indicates if memory is being managed by CUDA API
363
- """
364
- return self .memory_location == 'managed'
365
-
366
327
@property
367
328
def is_const (self ):
368
329
"""
0 commit comments