Skip to content

Commit cbfd6e1

Browse files
feat: Update exampledx
1 parent 03df97a commit cbfd6e1

10 files changed

Lines changed: 1870 additions & 2 deletions

File tree

THIRD_PARTY_NOTICES.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Third-party notices
2+
3+
TransformersPHP includes compiled binaries of third-party libraries as a convenience to users. These binaries are
4+
distributed to facilitate the functionality of TransformersPHP, but TransformersPHP does not claim ownership of the
5+
binaries or the underlying libraries. The original authors and contributors of these libraries retain all rights. It is
6+
the user's responsibility to ensure compliance with the respective licenses of these libraries when using or
7+
distributing the bundled binaries.
8+
9+
Below is a list of the third-party libraries included with TransformersPHP, along with their respective licenses and
10+
other relevant information.
11+
12+
| Library | Used under the terms of |
13+
|---------------|-----------------------------------------------------------------------------------------------------------|
14+
| OpenMP | MIT License |
15+
| OnnxRuntime | MIT License |
16+
| OpenBlas | BSD 3-Clause License |
17+
| Rindow Matlib | BSD 3-Clause License |
18+
| LibSamplerate | BSD 2-Clause License |
19+
| Libsndfile | LGPL 2.1 License |
20+
| aom | BSD 2-Clause + [Alliance for Open Media Patent License 1.0](https://aomedia.org/license/patent-license/) |
21+
| cairo | Mozilla Public License 2.0 |
22+
| cgif | MIT Licence |
23+
| expat | MIT Licence |
24+
| fontconfig | [fontconfig Licence](https://gitlab.freedesktop.org/fontconfig/fontconfig/blob/main/COPYING) (BSD-like) |
25+
| freetype | [freetype Licence](https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/FTL.TXT) (BSD-like) |
26+
| fribidi | LGPLv3 |
27+
| glib | LGPLv3 |
28+
| harfbuzz | MIT Licence |
29+
| highway | Apache-2.0 License, BSD 3-Clause |
30+
| lcms | MIT Licence |
31+
| libarchive | BSD 2-Clause |
32+
| libexif | LGPLv3 |
33+
| libffi | MIT Licence |
34+
| libheif | LGPLv3 |
35+
| libimagequant | [BSD 2-Clause](https://github.com/lovell/libimagequant/blob/main/COPYRIGHT) |
36+
| libnsgif | MIT Licence |
37+
| libpng | [libpng License](https://github.com/pnggroup/libpng/blob/master/LICENSE) |
38+
| librsvg | LGPLv3 |
39+
| libspng | [BSD 2-Clause, libpng License](https://github.com/randy408/libspng/blob/master/LICENSE) |
40+
| libtiff | [libtiff License](https://gitlab.com/libtiff/libtiff/blob/master/LICENSE.md) (BSD-like) |
41+
| libvips | LGPLv3 |
42+
| libwebp | New BSD License |
43+
| libxml2 | MIT Licence |
44+
| mozjpeg | [zlib License, IJG License, BSD-3-Clause](https://github.com/mozilla/mozjpeg/blob/master/LICENSE.md) |
45+
| pango | LGPLv3 |
46+
| pixman | MIT Licence |
47+
| proxy-libintl | LGPLv3 |
48+
| zlib-ng | [zlib Licence](https://github.com/zlib-ng/zlib-ng/blob/develop/LICENSE.md) |
49+
50+
---
51+
52+

examples/composer.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"require": {
1515
"php": "^8.1",
1616
"symfony/console": "^7.0",
17-
"codewithkyrian/transformers": "*"
17+
"codewithkyrian/transformers": "*",
18+
"codewithkyrian/transformers-libsloader": "^2.0"
1819
},
1920
"require-dev": {
2021
"symfony/var-dumper": "^7.0"
@@ -29,7 +30,8 @@
2930
"config": {
3031
"allow-plugins": {
3132
"codewithkyrian/transformers-libraries-downloader": true,
32-
"codewithkyrian/transformers-libsloader": true
33+
"codewithkyrian/transformers-libsloader": true,
34+
"codewithkyrian/composer-platform-packages": true
3335
}
3436
}
3537
}

examples/misc/general-test.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
include __DIR__.'/../vendor/autoload.php';
1010

11+
OnnxRuntime::version();
12+
dd(\Codewithkyrian\Transformers\Utils\timeUsage(true));
13+
1114
dd(
1215
Libc::version(),
1316
Sndfile::version(),

includes/buffer.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#define FFI_SCOPE "Rindow\\Math\\Buffer\\FFI"
2+
3+
typedef struct _rindow_complex_float { float real, imag; } rindow_complex_float;
4+
typedef struct _rindow_complex_double { double real, imag; } rindow_complex_double;
5+
//typedef struct { xdouble real, imag; } openblas_complex_xdouble;

0 commit comments

Comments
 (0)