14 Commits

Author SHA1 Message Date
Carson M.
d443aec9f8 examples(model-info): list custom metadata 2026-02-12 21:28:01 -06:00
Carson M.
967b61824f examples(model-info): update api 2026-02-11 11:29:10 -06:00
Carson M.
75d43518bd chore: use 2024 edition Rust 2025-10-25 15:39:24 -05:00
Carson M.
e169561d42 examples(model-info): update
should really be checking these in CI...
2025-09-09 14:23:38 -05:00
Carson M.
75ec921a1e examples: document examples
I'm pretty sure the modnet photo was taken by Charlotte May, not "Tyler Nix". The link leftover from cudarc's COPYRIGHT.md (btw, why did I delete that file from modnet?) is now a 404. Reverse image search led me to Charlotte May's photo on Pexels, and their profile features more photos of the same person. Does this mean 'Tyler Nix' is a THIEF...? Nixgate!!1!

Also, I once again apologize for saying I was gonna do this however long ago and then promptly forgetting to do it
2025-04-28 01:52:47 -05:00
Carson M.
9b316809bf fix(sys): do not require -fapple-link-rtlib
it really is that shrimple
2025-04-20 10:55:08 -05:00
Carson M.
dc76596976 examples: rework examples, ref #367
run with `cargo example-<name>`
2025-03-22 00:04:21 -05:00
Carson M.
1dbad54248 refactor!: precompute value dtype/memory info
Breaking because `extract_tensor_*` now returns `&[i64]` for dimensions, and `dtype()` and `memory_info()` also return references.

Each tensor extract call not only had multiple FFI calls to determine the `ValueType`, but also had to determine `MemoryInfo` to ensure the data was CPU-accessible. Since neither the data type or memory location can *change* for a given value, it doesn't make sense to compute this on each extract call; it's better to compute it once, when we create the `Value` (and we often already have the types created by this time, so little FFI is actually required).

This should make `extract_tensor_raw` zero-alloc, most benefitting usages of `IoBinding`/`OutputSelector`. This does mean usages of `Value` without ever extracting said value (like HF Transformers hidden state outputs which go ignored) incur slightly more overhead, but the tradeoff of having less overhead at extraction time seems worth it.
2024-11-15 18:08:42 -06:00
Carson M.
d4f82fc50e refactor!: undo The Flattening 2024-11-12 22:19:15 -06:00
Carson M.
a9557aae39 examples(model-info): display optional types 2024-09-04 20:15:53 -05:00
Carson M.
33938fde8b refactor: rename SessionBuilder commit methods 2024-02-28 21:17:54 -06:00
Carson M.
11d267eb44 fix: add apple rtlib link to examples 2024-02-28 09:15:47 -06:00
Carson M.
af97600869 feat: extract sequences & maps. closes #30 2023-12-27 23:31:18 -06:00
Carson M.
3251b97bbe feat: model metadata printer example 2023-12-05 19:07:00 -06:00