-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default ctx initialization improvements, and custom buffer size #256
Conversation
Allows per-process global config options to be controlled by user.
bf690ab
to
5854a9e
Compare
config = tiledb.Config({'sm.memory_budget': 2 * 1024**2}) | ||
# create context with 1 MB memory budget (2 MB total, 1 MB usable) | ||
config = tiledb.Config({'sm.memory_budget': 2 * 1024**2, | ||
'py.init_buffer_bytes': 1024**2 }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stavrospapadopoulos do you foresee any problem with putting a custom value in the Config object, in order to maintain a consistent API? Seems to work... (alternatively, could have a separate py_config
object)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, the global context changes are going to be nice to fix the tbb issue for multi-process local setups!
Also thanks for the quick turn around on py.init_buffer_bytes
. py.init_buffer_bytes
is per buffer (attr/coords) right?
yes |
4919e88
to
cf0ea27
Compare
(see detailed explanation in code comment)
cf0ea27
to
5425062
Compare
default_ctx
lazily, allowing user control over global per-process settings when necessary (e.g.sm.num_tbb_threads
)default_ctx
may be initialized with custom settings by callingtiledb.libtiledb.initialize_ctx()
tiledb.Ctx(...)
should specify number of threads (if needed) whenever called before an implicit call todefault_ctx()
(unlikely)default_ctx
a delayed call in all method definitionspy.init_buffer_bytes
parameter