From 0400d7a9f9611b00b49246de9ccbb236c6effc67 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Mon, 23 Sep 2024 13:27:24 -0700 Subject: [PATCH] Stop shadowing free function (#6076) I think this is currently working because [the function defined in fil.h is templated](https://github.com/rapidsai/cuml/blob/branch-24.10/python/cuml/cuml/fil/fil.pyx#L324), whereas the base C free function is not, and so Cython is parsing this correctly. However, not all versions of Cython can parse this correctly, and cuml currently fails to build on the trunk of Cython repository as a result. Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - Dante Gama Dessavre (https://github.com/dantegd) - Bradley Dice (https://github.com/bdice) URL: https://github.com/rapidsai/cuml/pull/6076 --- python/cuml/cuml/fil/fil.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/cuml/cuml/fil/fil.pyx b/python/cuml/cuml/fil/fil.pyx index 2589ec8bd8..cff4b6f453 100644 --- a/python/cuml/cuml/fil/fil.pyx +++ b/python/cuml/cuml/fil/fil.pyx @@ -26,7 +26,7 @@ rmm = gpu_only_import('rmm') from libcpp cimport bool from libc.stdint cimport uintptr_t -from libc.stdlib cimport free +from libc.stdlib cimport free as c_free import cuml.internals from cuml.internals.array import CumlArray @@ -545,7 +545,7 @@ cdef class ForestInference_impl(): treelite_params.threads_per_tree = kwargs['threads_per_tree'] if kwargs['compute_shape_str']: if self.shape_str: - free(self.shape_str) + c_free(self.shape_str) treelite_params.pforest_shape_str = &self.shape_str else: treelite_params.pforest_shape_str = NULL