Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
SylvanBrocard committed Oct 24, 2024
1 parent 1694245 commit 316a176
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 57 deletions.
2 changes: 2 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# All emails used by Sylvan Brocard
SylvanBrocard <[email protected]> <[email protected]>
18 changes: 0 additions & 18 deletions .pylintrc

This file was deleted.

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ dpu_kmeans README
| CI | status |
| ---------- | ------------------------------------------------------------ |
| pip builds | [![Pip Actions Status][actions-pip-badge]][actions-pip-link] |
| docs | [![Doc Status][actions-docs-badge]][actions-docs-link] |

A project built with [pybind11](https://github.com/pybind/pybind11) and [scikit-build](https://github.com/scikit-build/scikit-build), running the KMeans algorithm on in-memory processors with the UPMEM SDK.

[actions-pip-link]: https://github.com/upmem/dpu_kmeans/actions?query=workflow%3APip
[actions-pip-badge]: https://github.com/upmem/dpu_kmeans/workflows/Pip/badge.svg
[actions-docs-link]: https://github.com/upmem/dpu_kmeans/actions?query=workflow%3Adocumentation
[actions-docs-badge]: https://github.com/upmem/dpu_kmeans/workflows/documentation/badge.svg

Documentation
-------------
Expand Down
27 changes: 0 additions & 27 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
[build-system]
requires = [
# "setuptools>=42",
# "wheel",
# "pybind11>=2.7.1",
"pybind11",
# "scikit-build>=0.12",
# "pkgconfig",
# "setuptools_scm>=6.2",
"scikit-build-core>=0.10",
# "pybind11-stubgen",
# "ninja",
]
build-backend = "scikit_build_core.build"

Expand Down Expand Up @@ -53,33 +45,14 @@ doc = ["sphinx", "pydata-sphinx-theme", "myst-parser[linkify]"]

[tool.setuptools_scm]

# [tool.cibuildwheel]
# build-frontend = "build[uv]"

# [tool.setuptools]
# zip-safe = false

# [tool.setuptools.packages.find]
# where = ["src"]

# [tool.setuptools.package-data]
# dpu_kmeans = ["*.exe"]

[tool.scikit-build]
minimum-version = "build-system.requires"
metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"
sdist.exclude = ["benchmarks", ".dvc", ".dvcignore", ".github", ".devcontainer"]
# editable.mode = "inplace"
sdist.include = ["src/dpu_kmeans/dpu_program", "src/dpu_kmeans/_core.*.so"]
# wheel.packages = ["src/dpu_kmeans"]

# [tool.scikit-build.wheel.packages]
# dpu_kmeans = "src/dpu_kmeans"
# "dpu_kmeans/dpu_program" = "src/dpu_kmeans/dpu_program"

[tool.scikit-build.cmake]
build-type = "Release"
# args = ["-B", "build"]

[tool.scikit-build.cmake.define]
NR_TASKLETS = "16"
Expand Down
17 changes: 5 additions & 12 deletions src/dpu_program/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,7 @@ if(NOT DEFINED UPMEM_HOME)
endif()
endif()

# include("${UPMEM_HOME}/share/upmem/cmake/dpu.cmake")
# CMAKE_FORCE_C_COMPILER(${tools}/dpu-upmem-dpurte-clang Clang)
message(INFO "ranlib : ${CMAKE_RANLIB}, ${CMAKE_C_COMPILER_RANLIB}")
include(CheckIPOSupported)
check_ipo_supported(
RESULT ipo_supported
OUTPUT error
LANGUAGES C)
if(NOT ipo_supported)
message(FATAL_ERROR "IPO / LTO not supported: <${error}>")
endif()
# message(FATAL_ERROR "Compiler ID: ${CMAKE_C_COMPILER_ID}")

if(NOT CMAKE_BUILD_TYPE)
message(FATAL_ERROR "CMAKE_BUILD_TYPE must be set")
Expand All @@ -39,12 +28,16 @@ add_executable(kmeans_dpu_kernel kmeans_dpu_kernel.c)
target_compile_definitions(kmeans_dpu_kernel PUBLIC NR_TASKLETS=${NR_TASKLETS})
target_link_options(kmeans_dpu_kernel PUBLIC -DNR_TASKLETS=${NR_TASKLETS})

check_ipo_supported(
RESULT ipo_supported
OUTPUT error
LANGUAGES C)
if(ipo_supported)
message(STATUS "IPO / LTO enabled")
set_target_properties(kmeans_dpu_kernel
PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE)
else()
message(STATUS "IPO / LTO not supported: <${error}>")
message(FATAL_ERROR "IPO / LTO not supported: <${error}>")
endif()

install(TARGETS trivial_checksum_example DESTINATION ${PROJECT_NAME})
Expand Down

0 comments on commit 316a176

Please sign in to comment.