IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

Mojo struct

AccessProperty

struct AccessProperty

Specifies performance hint with AccessPolicyWindow for hit_prop and miss_prop fields.

This struct defines cache persistence properties that can be used with AccessPolicyWindow to control how data is cached during GPU memory accesses. It provides hints to the memory subsystem about the expected access patterns, which can improve performance for specific workloads.

Implemented traits​

AnyType, Copyable, Deinitable, Equatable, ImplicitlyCopyable, Movable, RegisterPassable, TrivialRegisterPassable, Writable

comptime members​

NORMAL​

comptime NORMAL = AccessProperty(Int32(0))

Normal cache persistence with default caching behavior.

PERSISTING​

comptime PERSISTING = AccessProperty(Int32(2))

Persisting access is more likely to persist in cache, optimized for reused data.

STREAMING​

comptime STREAMING = AccessProperty(Int32(1))

Streaming access is less likely to persist in cache, optimized for single-use data.

Methods​

__eq__​

def __eq__(self, other: Self) -> Bool

Compares two AccessProperty instances for equality.

Args:

  • ​other (Self): The AccessProperty to compare with.

Returns:

Bool: True if the instances have the same value, False otherwise.

__ne__​

def __ne__(self, other: Self) -> Bool

Compares two AccessProperty instances for inequality.

Args:

  • ​other (Self): The AccessProperty to compare with.

Returns:

Bool: True if the instances have different values, False otherwise.

write_to​

def write_to(self, mut writer: T)

Writes a string representation of the AccessProperty to a writer.

Args:

  • ​writer (T): The writer instance to write the formatted string to.