From edcff53ceecd1d68ba0226e78738cb48dc57df2a Mon Sep 17 00:00:00 2001 From: Samir Nasibli Date: Sat, 26 Oct 2024 17:05:55 -0700 Subject: [PATCH 1/2] DOC: Dev guides --- doc/sources/developers/array_api.rst | 20 ++++++++++++ doc/sources/{ => developers}/contribute.rst | 0 doc/sources/developers/dispatching.rst | 19 ++++++++++++ doc/sources/developers/estimators.rst | 34 +++++++++++++++++++++ doc/sources/developers/pybind11.rst | 21 +++++++++++++ doc/sources/developers/spmd.rst | 21 +++++++++++++ doc/sources/developers/threading.rst | 22 +++++++++++++ doc/sources/index.rst | 17 +++++++++-- 8 files changed, 151 insertions(+), 3 deletions(-) create mode 100644 doc/sources/developers/array_api.rst rename doc/sources/{ => developers}/contribute.rst (100%) create mode 100644 doc/sources/developers/dispatching.rst create mode 100644 doc/sources/developers/estimators.rst create mode 100644 doc/sources/developers/pybind11.rst create mode 100644 doc/sources/developers/spmd.rst create mode 100644 doc/sources/developers/threading.rst diff --git a/doc/sources/developers/array_api.rst b/doc/sources/developers/array_api.rst new file mode 100644 index 0000000000..d8df3052b3 --- /dev/null +++ b/doc/sources/developers/array_api.rst @@ -0,0 +1,20 @@ +.. ****************************************************************************** +.. * Copyright 2024 Intel Corporation +.. * +.. * Licensed under the Apache License, Version 2.0 (the "License"); +.. * you may not use this file except in compliance with the License. +.. * You may obtain a copy of the License at +.. * +.. * http://www.apache.org/licenses/LICENSE-2.0 +.. * +.. * Unless required by applicable law or agreed to in writing, software +.. * distributed under the License is distributed on an "AS IS" BASIS, +.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. * See the License for the specific language governing permissions and +.. * limitations under the License. +.. *******************************************************************************/ + +.. _array_api_dev: + +Array API support +================= \ No newline at end of file diff --git a/doc/sources/contribute.rst b/doc/sources/developers/contribute.rst similarity index 100% rename from doc/sources/contribute.rst rename to doc/sources/developers/contribute.rst diff --git a/doc/sources/developers/dispatching.rst b/doc/sources/developers/dispatching.rst new file mode 100644 index 0000000000..2807163c2f --- /dev/null +++ b/doc/sources/developers/dispatching.rst @@ -0,0 +1,19 @@ +.. ****************************************************************************** +.. * Copyright 2024 Intel Corporation +.. * +.. * Licensed under the Apache License, Version 2.0 (the "License"); +.. * you may not use this file except in compliance with the License. +.. * You may obtain a copy of the License at +.. * +.. * http://www.apache.org/licenses/LICENSE-2.0 +.. * +.. * Unless required by applicable law or agreed to in writing, software +.. * distributed under the License is distributed on an "AS IS" BASIS, +.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. * See the License for the specific language governing permissions and +.. * limitations under the License. +.. *******************************************************************************/ + +Dispatch mechanism +================== +TBD \ No newline at end of file diff --git a/doc/sources/developers/estimators.rst b/doc/sources/developers/estimators.rst new file mode 100644 index 0000000000..7aedc6e82f --- /dev/null +++ b/doc/sources/developers/estimators.rst @@ -0,0 +1,34 @@ +.. ****************************************************************************** +.. * Copyright 2024 Intel Corporation +.. * +.. * Licensed under the Apache License, Version 2.0 (the "License"); +.. * you may not use this file except in compliance with the License. +.. * You may obtain a copy of the License at +.. * +.. * http://www.apache.org/licenses/LICENSE-2.0 +.. * +.. * Unless required by applicable law or agreed to in writing, software +.. * distributed under the License is distributed on an "AS IS" BASIS, +.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. * See the License for the specific language governing permissions and +.. * limitations under the License. +.. *******************************************************************************/ + +.. _estimators: + +========== +Estimators +========== +TBD + +daal4py +======= +TBD + +onedal4py +========= +TBD + +sklearnex +========= +TBD \ No newline at end of file diff --git a/doc/sources/developers/pybind11.rst b/doc/sources/developers/pybind11.rst new file mode 100644 index 0000000000..cd159a7a4d --- /dev/null +++ b/doc/sources/developers/pybind11.rst @@ -0,0 +1,21 @@ +.. ****************************************************************************** +.. * Copyright 2024 Intel Corporation +.. * +.. * Licensed under the Apache License, Version 2.0 (the "License"); +.. * you may not use this file except in compliance with the License. +.. * You may obtain a copy of the License at +.. * +.. * http://www.apache.org/licenses/LICENSE-2.0 +.. * +.. * Unless required by applicable law or agreed to in writing, software +.. * distributed under the License is distributed on an "AS IS" BASIS, +.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. * See the License for the specific language governing permissions and +.. * limitations under the License. +.. *******************************************************************************/ + +.. _pybind11: + +pybind11 +======== +TBD \ No newline at end of file diff --git a/doc/sources/developers/spmd.rst b/doc/sources/developers/spmd.rst new file mode 100644 index 0000000000..d786f7e712 --- /dev/null +++ b/doc/sources/developers/spmd.rst @@ -0,0 +1,21 @@ +.. ****************************************************************************** +.. * Copyright 2024 Intel Corporation +.. * +.. * Licensed under the Apache License, Version 2.0 (the "License"); +.. * you may not use this file except in compliance with the License. +.. * You may obtain a copy of the License at +.. * +.. * http://www.apache.org/licenses/LICENSE-2.0 +.. * +.. * Unless required by applicable law or agreed to in writing, software +.. * distributed under the License is distributed on an "AS IS" BASIS, +.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. * See the License for the specific language governing permissions and +.. * limitations under the License. +.. *******************************************************************************/ + +.. _spmd: + +SPMD ifaces +=========== +TBD \ No newline at end of file diff --git a/doc/sources/developers/threading.rst b/doc/sources/developers/threading.rst new file mode 100644 index 0000000000..9bf9c37bf7 --- /dev/null +++ b/doc/sources/developers/threading.rst @@ -0,0 +1,22 @@ +.. ****************************************************************************** +.. * Copyright 2024 Intel Corporation +.. * +.. * Licensed under the Apache License, Version 2.0 (the "License"); +.. * you may not use this file except in compliance with the License. +.. * You may obtain a copy of the License at +.. * +.. * http://www.apache.org/licenses/LICENSE-2.0 +.. * +.. * Unless required by applicable law or agreed to in writing, software +.. * distributed under the License is distributed on an "AS IS" BASIS, +.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. * See the License for the specific language governing permissions and +.. * limitations under the License. +.. *******************************************************************************/ + + +.. _threading: + +Threading +========= +TBD \ No newline at end of file diff --git a/doc/sources/index.rst b/doc/sources/index.rst index 4489f995a3..528522ea9a 100755 --- a/doc/sources/index.rst +++ b/doc/sources/index.rst @@ -98,7 +98,7 @@ Enable Intel(R) GPU optimizations kaggle.rst .. toctree:: - :caption: Developer Guide + :caption: User Guide :hidden: :maxdepth: 2 @@ -109,7 +109,6 @@ Enable Intel(R) GPU optimizations array_api.rst verbose.rst deprecation.rst - .. toctree:: :caption: Performance @@ -126,11 +125,23 @@ Enable Intel(R) GPU optimizations Tutorials & Case Studies Medium Blogs +.. toctree:: + :caption: Developer’s Guide + :hidden: + :maxdepth: 2 + + developers/contribute.rst + developers/dispatching.rst + developers/estimators.rst + developers/pybind11.rst + developers/array_api.rst + developers/spmd.rst + developers/threading.rst + .. toctree:: :caption: More :hidden: :maxdepth: 2 Support - contribute.rst license.rst From 8733ef7afde91d15fdc4f2d668d88c743e5300c8 Mon Sep 17 00:00:00 2001 From: Samir Nasibli Date: Sat, 26 Oct 2024 18:01:04 -0700 Subject: [PATCH 2/2] DOC: onedal4py table convert helpers --- doc/sources/developers/estimators.rst | 28 ++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/doc/sources/developers/estimators.rst b/doc/sources/developers/estimators.rst index 7aedc6e82f..0bf65bb994 100644 --- a/doc/sources/developers/estimators.rst +++ b/doc/sources/developers/estimators.rst @@ -13,7 +13,6 @@ .. * See the License for the specific language governing permissions and .. * limitations under the License. .. *******************************************************************************/ - .. _estimators: ========== @@ -27,8 +26,35 @@ TBD onedal4py ========= + +`to_table` +---------- +In data processing stage `to_table` can be used as a step to transform input data to backend +oneDAL lib table format before feeding it into the backend functions, ensuring compatibility +and consistency. + +The input data could be a NumPy ndarray, DPCTL usm_ndarray, DPNP ndarray or a CSR matrix or array. +You want to ensure that all data is converted to a table format before passing them backend functions. + +If using the sua_iface parameter, ensure that the backend is correctly set up and compatible +with the data being processed. Different backends may have specific requirements or optimizations. + TBD +.. code-block:: python + + # Using to_table to convert different formats to oneDAL table + + data_array = np.array([[7, 8, 9], [10, 11, 12]]) + table_from_array = to_table(data_array) + + # Example CSR matrix + row = np.array([0, 0, 1, 2, 2, 2]) + col = np.array([0, 2, 2, 0, 1, 2]) + data = np.array([1, 2, 3, 4, 5, 6]) + data_csr = csr_matrix((data, (row, col)), shape=(3, 3)).toarray() + table_from_csr = to_table(data_csr) + sklearnex ========= TBD \ No newline at end of file