Repository navigation
Conversation
| # See cpp/src/utilities/cuda_utils.cu | ||
| # cudaerr = self._api.gdf_cuda_last_error() | ||
| # errname = self._ffi_str(self._api.gdf_cuda_error_name(cudaerr)) | ||
| # details = self._ffi_str(self._api.gdf_cuda_error_string(cudaerr)) |
There was a problem hiding this comment.
This abused CFFI for a circular dependency on libcudf, need to decide what we want to do here...
There was a problem hiding this comment.
@harrism could use your guidance here on what we should do for error checking the functions for now. It looks like we were checking for libgdf error codes within RMM here which feels... wrong?
There was a problem hiding this comment.
No, we were checking CUDA error codes using cudf's gdf_cuda_error_*() functions. All those do is pass through to CUDA APIs. I think when we switch to exceptions the error codes go away in RMM, and it will throw exceptions with useful messages anyway. So this whole function can go away then, right?
There was a problem hiding this comment.
You are right that was a silly dependency on cuDF.
There was a problem hiding this comment.
cc @jrhemstad if you have any thoughts on this since #38 has been sitting on deck for quite a bit.
There was a problem hiding this comment.
Connected with @jrhemstad and he said #38 isn't feasible for 0.10, so just moved to using the built-in RMM functions for handling RMM error codes and we can rip that out in the future when we enable exceptions.
dantegd
left a comment
There was a problem hiding this comment.
Just some very small questions, besides that it looks good!
| frame = inspect.currentframe().f_back | ||
| while frame: | ||
| filename = inspect.getfile(frame) | ||
| # May need to tweak this to handle Cython |
There was a problem hiding this comment.
is there a github issue to look into this further?
There was a problem hiding this comment.
Nope, I just saw that we check for rmm.py and didn't want to dive further in for this initial move.
| return out_dev_array, False | ||
| else: | ||
| if isinstance(obj, np.void): | ||
| # raise NotImplementedError("DeviceRecord type not supported " |
There was a problem hiding this comment.
seems to be leftover commented code that needs to be removed?
There was a problem hiding this comment.
Possibly, I only tried to touch what was necessary to touch and this was a function that only used the Python API which didn't change so I didn't touch it.
| Usage example: | ||
| from librmm_cffi import librmm_config as rmm_cfg | ||
| rmm_cf.use_pool_allocator = True | ||
| from rmm import rmm_cfg |
There was a problem hiding this comment.
why rename config to cfg? Seems like config is just a little bit more clear and nicer looking
|
|
||
|
|
||
| @pytest.mark.parametrize('dtype,nelem', list(product(_dtypes, _nelems))) | ||
| @pytest.mark.parametrize("dtype,nelem", list(product(_dtypes, _nelems))) |
There was a problem hiding this comment.
I didn't modify these tests at all, only ran them through isort / black 😁
|
Closing as this is superceded by #137 |
Fixes #40