Skip to content
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

Testing function for chunked memory pool test #161

Open
LWisteria opened this issue Jan 26, 2019 · 0 comments
Open

Testing function for chunked memory pool test #161

LWisteria opened this issue Jan 26, 2019 · 0 comments
Labels
tests Create and/or modify tests

Comments

@LWisteria
Copy link
Member

Theare are many same parts for memory pool test. e.g.

# create chunk and free to prepare chunk in pool
self.pool = clpy.backend.memory.SingleDeviceMemoryPool()
clpy.backend.memory.set_allocator(self.pool.malloc)
self.pooled_chunk_size = clpy.backend.memory.subbuffer_alignment * 2
self.tmp = self.pool.malloc(self.pooled_chunk_size)
self.pool.free(self.tmp.buf, self.pooled_chunk_size, 0)

Those causes maintainance risk. Unify them into a function of testing tool.

@LWisteria LWisteria added the tests Create and/or modify tests label Jan 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Create and/or modify tests
Projects
None yet
Development

No branches or pull requests

1 participant