cuda.core.managed_memory.advise#
- cuda.core.managed_memory.advise(
- Buffer target: Buffer,
- advice: driver.CUmem_advise | str,
- location: Device | int | None = None,
- *,
- str location_type: str | None = None,
Apply managed-memory advice to an allocation range.
- Parameters:
target (
Buffer) – Managed allocation to operate on.advice (
CUmem_advise| str) – Managed-memory advice to apply. String aliases such as"set_read_mostly","set_preferred_location", and"set_accessed_by"are accepted.location (
Device| int | None, optional) – Target location. Whenlocation_typeisNone, values are interpreted as a device ordinal,-1for host, orNonefor advice values that ignore location.location_type (str | None, optional) – Explicit location kind. Supported values are
"device","host","host_numa", and"host_numa_current".