Lunderberg commented on a change in pull request #10538:
URL: https://github.com/apache/tvm/pull/10538#discussion_r833617023
##########
File path: python/tvm/tir/schedule/schedule.py
##########
@@ -71,6 +73,13 @@ def __init__(self) -> None:
}
+class BufferType(enum.IntEnum):
+ """Type of buffer in access regions of a block"""
+
+ READ = 0
+ WRITE = 1
+
Review comment:
This sounds good to me as well, and would give the same readability
benefits at the caller side. I kind of like the `enum` usage in python as
well, since it lets the reader know what options are possible, but that's the
less important benefit.
At some point, it would be nice to have a macro to define an enum in C++,
along with its value/name mapping and an FFI interface, so that there would be
a clear way to handle these.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]