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

[ml-dtypes] create a new port #110

Merged
merged 3 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions ports/ml-dtypes/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
cmake_minimum_required(VERSION 3.13)
project(ml_dtypes CXX)

include(GNUInstallDirs)

list(APPEND headers
include/float8.h
include/int4.h
)

add_library(ml_dtypes INTERFACE)

set_target_properties(ml_dtypes PROPERTIES
PUBLIC_HEADER "${headers}"
)

install(TARGETS ml_dtypes
EXPORT ml_dtypes-config
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ml_dtypes
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
install(EXPORT EXPORT ml_dtypes-config
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/ml_dtypes
)
15 changes: 15 additions & 0 deletions ports/ml-dtypes/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO jax-ml/ml_dtypes
REF v0.3.0
SHA512 98f64c9a4d4844d63fbb9ec6448899d4e5518f9d976baf8689f632c2840a6029c991c303e21b9a2d2eee4f2217d76dc1eaec1b235d3b38eb30616a70230ade13
)
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}/ml_dtypes")

vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}/ml_dtypes")
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH "share/ml_dtypes" PACKAGE_NAME "ml_dtypes")

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
17 changes: 17 additions & 0 deletions ports/ml-dtypes/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "ml-dtypes",
"version-semver": "0.3.0",
"description": "A stand-alone implementation of several NumPy dtype extensions used in machine learning.",
"homepage": "https://github.com/jax-ml/ml_dtypes",
"dependencies": [
"eigen3",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@
"baseline": "2023-04-05",
"port-version": 0
},
"ml-dtypes": {
"baseline": "0.3.0",
"port-version": 0
},
"onnx": {
"baseline": "1.12.0",
"port-version": 0
Expand Down
9 changes: 9 additions & 0 deletions versions/m-/ml-dtypes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "9c8604813cd65c4b3992edb91b7d116f49ff3294",
"version-semver": "0.3.0",
"port-version": 0
}
]
}
Loading