# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           github 1.0
PortGroup           cmake 1.1

github.setup        ml-explore mlx-c 0.7.0 v
revision            0
checksums           rmd160  9de57dd91db573d0c3944f1f69b6e5d96ad84b39 \
                    sha256  ee726bb38e191bb3c516a6bae47dc8abad9e5f273873385839019ce46bfceab5 \
                    size    178593
github.tarball_from archive

categories          llm devel
maintainers         {@neverpanic cal} openmaintainer
supported_archs     arm64

license             MIT
description         MLX C is a C API for MLX, which is an array framework for \
                    machine learning on Apple silicon, brought to you by Apple \
                    machine learning research.
long_description    ${description}

use_xcode           yes
compiler.cxx_standard \
                    2020

depends_lib-append  port:mlx

patchfiles-append   0001-mlx-c-qmm-global-scale.patch \
                    0002-fast-gated-delta-update.patch
patch.args          -p1
 
configure.args-append \
                    -DMLX_C_USE_SYSTEM_MLX=On \
                    -DBUILD_SHARED_LIBS=On \
                    -DFETCHCONTENT_FULLY_DISCONNECTED=On
