# \#25\_1

**URL:** https://forum.modular.com/tag/25-1/19.md

[Latest](https://forum.modular.com/latest.md) · [Categories](https://forum.modular.com/categories.md) · [Tags](https://forum.modular.com/tags.md)

---

## [Calling c functions with larger structs by value fails](https://forum.modular.com/t/calling-c-functions-with-larger-structs-by-value-fails/655)

<div class="topic-metadata">

**Author:** [@sbrunk](https://forum.modular.com/u/sbrunk)\
**Replies:** 7\
**Last updated:** [September 28, 2025, 5:16pm UTC](https://forum.modular.com/t/calling-c-functions-with-larger-structs-by-value-fails/655 "2025-09-28T17:16:28Z")

</div>

Here’s a minimized example of an issue I ran into, while working on the DuckDB Mojo bindings. I have a c function that expects to be called by value with a struct containing more than 2 elements. Using DLHandle.call, it…

---

## [Examples of programming GPU functions using the Mojo MAX Driver API](https://forum.modular.com/t/examples-of-programming-gpu-functions-using-the-mojo-max-driver-api/650)

<div class="topic-metadata">

**Author:** [@BradLarson](https://forum.modular.com/u/BradLarson)\
**Replies:** 5\
**Last updated:** [April 26, 2025, 4:19pm UTC](https://forum.modular.com/t/examples-of-programming-gpu-functions-using-the-mojo-max-driver-api/650 "2025-04-26T16:19:49Z")

</div>

In the latest MAX nightly, we’ve added a new group of GPU programming examples: how to write Mojo functions that run on a GPU via the MAX Driver API. These show a programming model that may be very familiar to CUDA C pro…

---

## [Mojo Doctest with Sync Parallelize](https://forum.modular.com/t/mojo-doctest-with-sync-parallelize/773)

<div class="topic-metadata">

**Author:** [@Samuel](https://forum.modular.com/u/Samuel)\
**Replies:** 1\
**Last updated:** [March 14, 2025, 9:46pm UTC](https://forum.modular.com/t/mojo-doctest-with-sync-parallelize/773 "2025-03-14T21:46:33Z")

</div>

When trying to run a doctest with sync\_parallelize, I cannot manage to run multiple tasks in a Doctest. Does mojo have a workaround for this? Or this is per design? This is an example: struct SyncPar: """Sync Parall…

---

## [Magic fails globally (glibc requirement)](https://forum.modular.com/t/magic-fails-globally-glibc-requirement/721)

<div class="topic-metadata">

**Author:** [@Samuel](https://forum.modular.com/u/Samuel)\
**Replies:** 4\
**Last updated:** [March 12, 2025, 8:00pm UTC](https://forum.modular.com/t/magic-fails-globally-glibc-requirement/721 "2025-03-12T20:00:42Z")

</div>

I updated magic to the latest version 0.7.1, after that, magic doesn’t work anymore. The last command I ran was: magic self-update After that, when I try to run magic it fails with: ~/.modular/bin/magic: /lib/x86\_64-l…

---

## [Syscall in Mojo](https://forum.modular.com/t/syscall-in-mojo/695)

<div class="topic-metadata">

**Author:** [@Samuel](https://forum.modular.com/u/Samuel)\
**Replies:** 4\
**Last updated:** [March 9, 2025, 1:45pm UTC](https://forum.modular.com/t/syscall-in-mojo/695 "2025-03-09T13:45:11Z")

</div>

Can we do Syscalls in Mojo?

---

## [I have discovered a suspect efficiency anomaly in the mojo compiler, how to proceed?](https://forum.modular.com/t/i-have-discovered-a-suspect-efficiency-anomaly-in-the-mojo-compiler-how-to-proceed/651)

<div class="topic-metadata">

**Author:** [@notnot](https://forum.modular.com/u/notnot)\
**Replies:** 20\
**Last updated:** [March 8, 2025, 6:22pm UTC](https://forum.modular.com/t/i-have-discovered-a-suspect-efficiency-anomaly-in-the-mojo-compiler-how-to-proceed/651 "2025-03-08T18:22:25Z")

</div>

As the title states. i have discovered an efficiency anomaly in the mojo compiler, where a function is about 100 times slower than expected. How to proceed? I can create a small repro case to illustrate it, so you compi…

---

## [Cast numpy integer into Mojo integer](https://forum.modular.com/t/cast-numpy-integer-into-mojo-integer/670)

<div class="topic-metadata">

**Author:** [@ferdinand](https://forum.modular.com/u/ferdinand)\
**Replies:** 2\
**Last updated:** [March 7, 2025, 7:10pm UTC](https://forum.modular.com/t/cast-numpy-integer-into-mojo-integer/670 "2025-03-07T19:10:12Z")

</div>

I’m updating this little library I have going to 25.1, and am having a bit of trouble with casting from numpy types to Mojo types. Essentially I used to be able to cast numpy.uint8 to a Mojo Int as: py\_array\[rows\]\[colu…

---

## [Vectorize and remainder loops](https://forum.modular.com/t/vectorize-and-remainder-loops/665)

<div class="topic-metadata">

**Author:** [@gphlipot](https://forum.modular.com/u/gphlipot)\
**Replies:** 6\
**Last updated:** [March 4, 2025, 1:44am UTC](https://forum.modular.com/t/vectorize-and-remainder-loops/665 "2025-03-04T01:44:10Z")

</div>

It seems like vectorize in the standard library doesn’t vectorize the remainder loops. I’m just wondering why that is the case and if it would make sense to also vectorize the remainder loops. Take the following code fo…

---

## [Mojo's Bridge package](https://forum.modular.com/t/mojos-bridge-package/583)

<div class="topic-metadata">

**Author:** [@rcmpge](https://forum.modular.com/u/rcmpge)\
**Replies:** 2\
**Last updated:** [February 26, 2025, 8:55pm UTC](https://forum.modular.com/t/mojos-bridge-package/583 "2025-02-26T20:55:37Z")

</div>

Is the developer of Mojo’s Bridge package here by chance. jw

---

## [Resources for learning MAX for non-ML developers](https://forum.modular.com/t/resources-for-learning-max-for-non-ml-developers/606)

<div class="topic-metadata">

**Author:** [@bgreni](https://forum.modular.com/u/bgreni)\
**Replies:** 2\
**Last updated:** [February 22, 2025, 2:39pm UTC](https://forum.modular.com/t/resources-for-learning-max-for-non-ml-developers/606 "2025-02-22T14:39:02Z")

</div>

Given that MAX is likely to attract new people to heterogeneous programming (me, I am people). I think it would helpful to have a collection of resources to help developers with no gpu programming experience get started …

---

## [Using Mojo to build JAX GPU kernels](https://forum.modular.com/t/using-mojo-to-build-jax-gpu-kernels/608)

<div class="topic-metadata">

**Author:** [@marcelroed](https://forum.modular.com/u/marcelroed)\
**Replies:** 0\
**Last updated:** [February 21, 2025, 7:46pm UTC](https://forum.modular.com/t/using-mojo-to-build-jax-gpu-kernels/608 "2025-02-21T19:46:42Z")

</div>

Hi! I’m very excited to explore Mojo for GPU kernels and to contribute to the ecosystem. I’m looking for some basic examples for how to build kernels for use from existing Python frameworks. Are there any examples that h…

---

## [When trying open-clip, getting "SmallVector unable to grow" internal error](https://forum.modular.com/t/when-trying-open-clip-getting-smallvector-unable-to-grow-internal-error/599)

<div class="topic-metadata">

**Author:** [@vladimir\_prus](https://forum.modular.com/u/vladimir_prus)\
**Replies:** 2\
**Last updated:** [February 21, 2025, 4:35am UTC](https://forum.modular.com/t/when-trying-open-clip-getting-smallvector-unable-to-grow-internal-error/599 "2025-02-21T04:35:14Z")

</div>

Hi, I am trying to run open-clip model using the ONNX format, and running into some internal error. The code is just this: from pathlib import Path import torch from datasets import load\_dataset from max import engin…

---

## [GPU Float64 memset support](https://forum.modular.com/t/gpu-float64-memset-support/586)

<div class="topic-metadata">

**Author:** [@bradenhelmer](https://forum.modular.com/u/bradenhelmer)\
**Replies:** 0\
**Last updated:** [February 17, 2025, 9:40pm UTC](https://forum.modular.com/t/gpu-float64-memset-support/586 "2025-02-17T21:40:33Z")

</div>

Experimenting with Mojo’s GPU package: from gpu.host import DeviceContext from gpu.host import DeviceBuffer fn main() raises: with DeviceContext() as ctx: var d\_buf = ctx.create\_buffer\_sync\[DType.float64\](1…

---

## [Should this parametric mutability example work?](https://forum.modular.com/t/should-this-parametric-mutability-example-work/574)

<div class="topic-metadata">

**Author:** [@duck\_tape](https://forum.modular.com/u/duck_tape)\
**Replies:** 8\
**Last updated:** [February 16, 2025, 7:03am UTC](https://forum.modular.com/t/should-this-parametric-mutability-example-work/574 "2025-02-16T07:03:37Z")

</div>

Is parametric mutability working? Or am I misunderstanding what it is? This does not let me mutate y. @value struct MyThing: var thing: String fn by\_ref\[ is\_mutable: Bool, //, origin: Origin\[is\_mutable\] \](ref …
