{"total_count":6,"incomplete_results":false,"items":[{"url":"https://api.github.com/repos/ml-explore/mlx/issues/4257","repository_url":"https://api.github.com/repos/ml-explore/mlx","labels_url":"https://api.github.com/repos/ml-explore/mlx/issues/4257/labels{/name}","comments_url":"https://api.github.com/repos/ml-explore/mlx/issues/4257/comments","events_url":"https://api.github.com/repos/ml-explore/mlx/issues/4257/events","html_url":"https://github.com/ml-explore/mlx/pull/4257","id":5154320738,"node_id":"PR_kwDOKzRn187_Ovcj","number":4257,"title":"Reject complex in expm1, sigmoid and arctan2","user":{"login":"ayaangazali","id":231403453,"node_id":"U_kgDODcrvvQ","avatar_url":"https://avatars.githubusercontent.com/u/231403453?v=4","gravatar_id":"","url":"https://api.github.com/users/ayaangazali","html_url":"https://github.com/ayaangazali","followers_url":"https://api.github.com/users/ayaangazali/followers","following_url":"https://api.github.com/users/ayaangazali/following{/other_user}","gists_url":"https://api.github.com/users/ayaangazali/gists{/gist_id}","starred_url":"https://api.github.com/users/ayaangazali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayaangazali/subscriptions","organizations_url":"https://api.github.com/users/ayaangazali/orgs","repos_url":"https://api.github.com/users/ayaangazali/repos","events_url":"https://api.github.com/users/ayaangazali/events{/privacy}","received_events_url":"https://api.github.com/users/ayaangazali/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[],"state":"closed","locked":false,"assignees":[],"milestone":null,"comments":0,"created_at":"2026-08-14T17:51:33Z","updated_at":"2026-08-15T03:59:34Z","closed_at":"2026-08-15T03:59:34Z","assignee":null,"author_association":"CONTRIBUTOR","issue_field_values":[],"type":null,"active_lock_reason":null,"draft":false,"pull_request":{"url":"https://api.github.com/repos/ml-explore/mlx/pulls/4257","html_url":"https://github.com/ml-explore/mlx/pull/4257","diff_url":"https://github.com/ml-explore/mlx/pull/4257.diff","patch_url":"https://github.com/ml-explore/mlx/pull/4257.patch","merged_at":"2026-08-15T03:59:34Z"},"body":"## Proposed changes\n\n`mx.expm1`, `mx.sigmoid` and `mx.arctan2` accept complex64 and quietly return an answer computed from the real part only:\n\n```python\n>>> z = mx.array([1 + 2j], mx.complex64)\n>>> mx.expm1(z).item()\n(1.718281865119934+0j)      # numpy and pytorch: -2.1312044+2.4717267j\n>>> mx.sigmoid(z).item()\n(0.9034420251846313+0j)     # 1/(1+exp(-z)) is 1.0214154+0.4034387j\n>>> mx.arctan2(z, mx.array([2 - 1j], mx.complex64)).item()\n(0.46364760398864746+0j)    # exactly atan2(1, 2)\n```\n\n`1.7182818` is `expm1(1)`, so the imaginary part is simply dropped. That happens because `complex64_t` converts to `float` by returning its real component, so `std::expm1` and the `abs` and `< 0` inside `Sigmoid` all silently take that conversion instead of failing to compile.\n\nThis is CPU only. The Metal kernels are instantiated with `instantiate_unary_float(Expm1)`, `instantiate_unary_float(Sigmoid)` and `instantiate_binary_float(ArcTan2)`, which cover float16, float32 and bfloat16 and not complex, so the GPU never had complex support for any of the three. The CPU was the odd one out, giving a wrong number where the GPU gives nothing.\n\nBoth now reject complex at the op level, the same way `floor`, `ceil`, `trunc`, `erf` and `erfinv` already do:\n\n```python\n>>> mx.expm1(z)\nValueError: [expm1] Not supported for complex64.\n>>> mx.sigmoid(z)\nValueError: [sigmoid] Not supported for complex64.\n>>> mx.arctan2(z, z)\nValueError: [arctan2] Not supported for complex64.\n```\n\n`arctan2` is the clear cut one, since numpy raises `TypeError` and pytorch raises `NotImplementedError` for complex there, so returning a number was never right.\n\n`expm1` and `sigmoid` are the arguable ones: numpy and pytorch do support those on complex, so rejecting is the smaller of the two honest options rather than the better one. Implementing them properly is not a one liner either, since `exp(z) - 1` is not good enough for a small argument (for `1e-8 + 1e-8j` numpy returns the input while `exp(z) - 1` loses the real part entirely), and it would need matching Metal and CUDA kernels. Happy to attempt that instead if you would rather have the feature than the guard.\n\n## Checklist\n\nPut an `x` in the boxes that apply.\n\n- [x] I have read the [CONTRIBUTING](https://github.com/ml-explore/mlx/blob/main/CONTRIBUTING.md) document\n- [x] I have run `pre-commit run --all-files` to format my code / installed pre-commit prior to committing changes\n- [x] I have added tests that prove my fix is effective or that my feature works\n- [x] I have updated the necessary documentation (if needed)\n\nCPU only build (`MLX_BUILD_METAL=OFF`) at 3d23f7d. Real inputs are untouched: `expm1`, `sigmoid` and `arctan2` still match numpy across the existing ranges, int32 promotes to float32, float16 and bfloat16 keep their dtype, gradients are unchanged and `nn.sigmoid` still behaves. `test_ops.py`, `test_nn.py`, `test_losses.py` and `test_autograd.py` pass, and the C++ suite passes (249 cases, 3350 assertions).\n\n---\n\nfreshman contributor, i use Claude Code while digging. this came out of running every unary op over complex64 and diffing against numpy. the giveaway was the value itself: seeing exactly `expm1(1)` come back for an input of `1+2j` made it obvious the imaginary half was being thrown away rather than mishandled.\n","reactions":{"url":"https://api.github.com/repos/ml-explore/mlx/issues/4257/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/ml-explore/mlx/issues/4257/timeline","performed_via_github_app":null,"state_reason":null,"score":1.0},{"url":"https://api.github.com/repos/ml-explore/mlx/issues/4227","repository_url":"https://api.github.com/repos/ml-explore/mlx","labels_url":"https://api.github.com/repos/ml-explore/mlx/issues/4227/labels{/name}","comments_url":"https://api.github.com/repos/ml-explore/mlx/issues/4227/comments","events_url":"https://api.github.com/repos/ml-explore/mlx/issues/4227/events","html_url":"https://github.com/ml-explore/mlx/pull/4227","id":5138834472,"node_id":"PR_kwDOKzRn187-cuSZ","number":4227,"title":"Add multi-point closed-form gradient reference tests","user":{"login":"4ktLuffy","id":146297264,"node_id":"U_kgDOCLhRsA","avatar_url":"https://avatars.githubusercontent.com/u/146297264?v=4","gravatar_id":"","url":"https://api.github.com/users/4ktLuffy","html_url":"https://github.com/4ktLuffy","followers_url":"https://api.github.com/users/4ktLuffy/followers","following_url":"https://api.github.com/users/4ktLuffy/following{/other_user}","gists_url":"https://api.github.com/users/4ktLuffy/gists{/gist_id}","starred_url":"https://api.github.com/users/4ktLuffy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4ktLuffy/subscriptions","organizations_url":"https://api.github.com/users/4ktLuffy/orgs","repos_url":"https://api.github.com/users/4ktLuffy/repos","events_url":"https://api.github.com/users/4ktLuffy/events{/privacy}","received_events_url":"https://api.github.com/users/4ktLuffy/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[],"state":"closed","locked":false,"assignees":[],"milestone":null,"comments":1,"created_at":"2026-08-13T07:15:50Z","updated_at":"2026-08-13T08:09:39Z","closed_at":"2026-08-13T08:09:39Z","assignee":null,"author_association":"NONE","issue_field_values":[],"type":null,"active_lock_reason":null,"draft":false,"pull_request":{"url":"https://api.github.com/repos/ml-explore/mlx/pulls/4227","html_url":"https://github.com/ml-explore/mlx/pull/4227","diff_url":"https://github.com/ml-explore/mlx/pull/4227.diff","patch_url":"https://github.com/ml-explore/mlx/pull/4227.patch","merged_at":null},"body":"### What this adds\n\nA new test file, `python/tests/test_grad_reference.py`, comparing gradients against closed-form derivatives evaluated in float64:\n\n- **15 elementwise ops** (`sin`, `sinh`, `cosh`, `tan`, `arcsin`, `arccos`, `arctan`, `arcsinh`, `arctanh`, `expm1`, `log1p`, `reciprocal`, `rsqrt`, `erf`, `sigmoid`) and **2 binary ops** (`logaddexp`, `arctan2`, both arguments).\n- **33 points per op** instead of one or two, over ranges chosen to stay well inside each op's domain and away from poles.\n- **Per-dtype tolerances** (`float32` rtol 1e-5, `float16` rtol 5e-3) rather than one generic value. These come from the measured agreement between MLX's float32 gradients and these closed forms on well-conditioned inputs, which sits at about one float32 epsilon (~1.2e-7); the tolerances leave roughly two orders of headroom so ordinary cross-machine rounding never trips them.\n- A second-order check on three ops, and a dedicated multi-point `erf` check.\n\nOne new file, no changes to existing tests. Runs in ~0.05s, passes on `DEVICE=cpu` and `DEVICE=gpu`.\n\n### Why\n\nThe existing autograd tests check a gradient against a hand-written expected value at one or two points. That is a real check, but a defect whose effect depends on the input can sit inside the gap.\n\n`erf` is the clean example. Its derivative is `2/sqrt(pi) * exp(-x^2)`, and the current exact assertion evaluates it at **x = 0**:\n\n```cpp\nCHECK_EQ(out.second.item<float>(),\n         static_cast<float>(1.12837916709551257389615890312154517));\n```\n\nThat assertion is tight — it catches an error in the `2/sqrt(pi)` coefficient down to ~1e-6 relative. But at `x = 0` the exponential factor is exactly `1.0`, which is exactly representable in every float format. So anything that goes wrong in *how that factor is computed or stored* — a lower-precision intermediate, a rounded temporary — changes nothing at that point and passes.\n\nEvaluating the same closed form on a grid closes that gap without touching any existing test.\n\n### Evidence it works\n\nI checked the current gradients first: across a sweep of these ops over several input classes, dtypes and both streams, I found **no gradient defects in v0.32.0**. This isn't a bug report — the gradients look healthy, and these tests guard the surface rather than fix anything.\n\nTo confirm the tests can detect something, I temporarily introduced two defects locally, one at a time, and reran both suites:\n\n| local defect (temporary, not in this PR) | existing python suite | these tests |\n|---|---|---|\n| `erf` backward rounds `exp(-x^2)` through float16 (~2.4e-4 relative) | passes | **fails** — `op='erf', dtype=float32`, 30/32 points mismatched, e.g. `0.020661240` vs expected `0.020666985` |\n| `arctan` backward rounds `(1+x^2)` through bfloat16 (~2.9e-3 relative) | fails (`test_trig_ops`) | **fails** — `op='arctan', dtype=float32` |\n\nThe first is the case that motivated this: a 2.4e-4 relative error in `erf`'s backward pass — four orders of magnitude larger than the coefficient error the x = 0 assertion catches — passes the existing suite because of where it's evaluated. The second is caught by both, which is what you'd expect when a defect is large enough to disturb an existing test.\n\nBoth defects were reverted and the tree rebuilt; the tests pass again on clean `v0.32.0`.\n\n### Scope — what these tests do not cover\n\n- **Small defects in float16 / bfloat16.** The legitimate spread between an fp16 gradient and a float64 reference is already ~6e-4 relative (~1e-3 for longer reductions), so a defect below that isn't distinguishable from rounding at that precision. The float16 tolerances here sit above that spread and will only catch coarse errors; bfloat16 isn't covered.\n- **Long reductions.** Only elementwise and simple binary ops. Reassociation in a long reduction widens the legitimate spread and would need its own tolerances.\n- **Selection ops** (`max`, `abs`, `sort`, `where`, `floor`, …) are deliberately excluded: their derivative isn't unique at ties and kinks, so a reference comparison there tests the tie-breaking convention rather than the gradient.\n- **GPU-kernel-specific paths.** The tests run on whichever device is selected, so they exercise Metal under `DEVICE=gpu`, but they compare against a mathematical reference rather than against the CPU result — this isn't a CPU-vs-Metal parity check.\n- Ops are covered via their closed form, so anything without a simple analytic derivative is out of scope.\n- **The tolerances are deliberately conservative** and can be tightened per-op once there's CI history showing the real cross-machine spread. They're set for margin on hardware I can't test rather than for maximum sensitivity.\n\nHappy to trim the op list, adjust tolerances, or split the file differently if you'd prefer a smaller footprint.\n","reactions":{"url":"https://api.github.com/repos/ml-explore/mlx/issues/4227/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/ml-explore/mlx/issues/4227/timeline","performed_via_github_app":null,"state_reason":null,"score":1.0},{"url":"https://api.github.com/repos/ml-explore/mlx/issues/3080","repository_url":"https://api.github.com/repos/ml-explore/mlx","labels_url":"https://api.github.com/repos/ml-explore/mlx/issues/3080/labels{/name}","comments_url":"https://api.github.com/repos/ml-explore/mlx/issues/3080/comments","events_url":"https://api.github.com/repos/ml-explore/mlx/issues/3080/events","html_url":"https://github.com/ml-explore/mlx/issues/3080","id":3872019248,"node_id":"I_kwDOKzRn187mylMw","number":3080,"title":"[BUG] arm64 CPU backend fails JIT compile when using Float16","user":{"login":"Joannis","id":1951674,"node_id":"MDQ6VXNlcjE5NTE2NzQ=","avatar_url":"https://avatars.githubusercontent.com/u/1951674?v=4","gravatar_id":"","url":"https://api.github.com/users/Joannis","html_url":"https://github.com/Joannis","followers_url":"https://api.github.com/users/Joannis/followers","following_url":"https://api.github.com/users/Joannis/following{/other_user}","gists_url":"https://api.github.com/users/Joannis/gists{/gist_id}","starred_url":"https://api.github.com/users/Joannis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Joannis/subscriptions","organizations_url":"https://api.github.com/users/Joannis/orgs","repos_url":"https://api.github.com/users/Joannis/repos","events_url":"https://api.github.com/users/Joannis/events{/privacy}","received_events_url":"https://api.github.com/users/Joannis/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[{"id":6264100344,"node_id":"LA_kwDOKzRn188AAAABdV6V-A","url":"https://api.github.com/repos/ml-explore/mlx/labels/bug","name":"bug","color":"d73a4a","default":true,"description":""}],"state":"closed","locked":false,"assignees":[],"milestone":null,"comments":13,"created_at":"2026-01-29T18:27:27Z","updated_at":"2026-05-09T00:02:14Z","closed_at":"2026-05-09T00:02:14Z","assignee":null,"author_association":"NONE","issue_field_values":[],"type":null,"active_lock_reason":null,"sub_issues_summary":{"total":0,"completed":0,"percent_completed":0},"issue_dependencies_summary":{"blocked_by":0,"total_blocked_by":0,"blocking":0,"total_blocking":0},"body":"**Describe the bug**\nWhen you configure MLX (through MLX-Swift in my case) to run on a arm64 Linux machine, JIT compilation fails when it involves a float16.\n\n**To Reproduce**\nI have a draft PR for MLX-swift-LM that demonstrates this in a Dockerfile:\nhttps://github.com/ml-explore/mlx-swift-lm/pull/87\n\n**Expected behavior**\nCPU backend, although slow, successfully JIT compiles the code and runs some inference.\n\n**Desktop (please complete the following information):**\n\n```dockerfile\nFROM --platform=linux/arm64 swift:6.2.3-jammy AS base\n\nRUN apt-get update && apt-get install -y \\\n    libblas-dev \\\n    liblapack-dev \\\n    liblapacke-dev \\\n    libopenblas-dev \\\n    gfortran \\\n    g++ \\\n    && rm -rf /var/lib/apt/lists/* \n\nWORKDIR /app\n\nFROM base AS builder\n\nCOPY . .\nRUN swift build --product WebExample --static-swift-stdlib -Xlinker -s -v\n\n# Final image\nFROM base\n\n# Copy executable from SwiftPM build directory\nCOPY --from=builder /app/.build/debug/WebExample /app/WebExample\n\nEXPOSE 8080\n\nCMD [\"./WebExample\"]\n```\n\n**Additional context**\n\n```\nMLX/ErrorHandler.swift:343: Fatal error: [Compile::eval_cpu] Failed to compile function     \n  Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous: Failed to execute             \n  command with return code 1: \"g++ -std=c++17 -O3 -Wall -fPIC -shared                         \n  \"/tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp\"      \n  -o \"/tmp/mlx/0.24.2/cpu/libBf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous     \n  .so\" 2>&1\", the output is: /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188     \n  972423790_contiguous.cpp:10:9: error: 'float16_t' has not been declared in '::'             \n  10 | using ::float16_t;                                                                     \n  |         ^~~~~~~~~                                                                         \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:74     \n  :14: error: declaration of 'operator+' as non-function                                      \n  74 | inline float operator+(float16_t lhs, bfloat16_t rhs) { return                         \n  static_cast<float>(lhs) + static_cast<float>(rhs); } inline float operator+(bfloat16_t      \n  lhs, float16_t rhs) { return static_cast<float>(lhs) + static_cast<float>(rhs); }           \n  |              ^~~~~~~~                                                                     \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:74     \n  :24: error: 'float16_t' was not declared in this scope; did you mean 'bfloat16_t'?          \n  74 | inline float operator+(float16_t lhs, bfloat16_t rhs) { return                         \n  static_cast<float>(lhs) + static_cast<float>(rhs); } inline float operator+(bfloat16_t      \n  lhs, float16_t rhs) { return static_cast<float>(lhs) + static_cast<float>(rhs); }           \n  |                        ^~~~~~~~~                                                          \n  |                        bfloat16_t                                                         \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:74     \n  :50: error: expected primary-expression before 'rhs'                                        \n  74 | inline float operator+(float16_t lhs, bfloat16_t rhs) { return                         \n  static_cast<float>(lhs) + static_cast<float>(rhs); } inline float operator+(bfloat16_t      \n  lhs, float16_t rhs) { return static_cast<float>(lhs) + static_cast<float>(rhs); }           \n  |                                                  ^~~                                      \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:74     \n  :156: error: 'float16_t' has not been declared                                              \n  74 | inline float operator+(float16_t lhs, bfloat16_t rhs) { return                         \n  static_cast<float>(lhs) + static_cast<float>(rhs); } inline float operator+(bfloat16_t      \n  lhs, float16_t rhs) { return static_cast<float>(lhs) + static_cast<float>(rhs); }           \n  |                                                                                           \n  ^~~~~~~~~                                                                                   \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:74     \n  :130: error: ambiguating new declaration of 'float                                          \n  mlx::core::operator+(mlx::core::bfloat16_t, int)'                                           \n  74 | inline float operator+(float16_t lhs, bfloat16_t rhs) { return                         \n  static_cast<float>(lhs) + static_cast<float>(rhs); } inline float operator+(bfloat16_t      \n  lhs, float16_t rhs) { return static_cast<float>(lhs) + static_cast<float>(rhs); }           \n  |                                                                                           \n  ^~~~~~~~                                                                                    \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:46     \n  :869: note: old declaration 'mlx::core::_MLX_BFloat16                                       \n  mlx::core::operator+(mlx::core::_MLX_BFloat16, int32_t)'                                    \n  46 | inline _MLX_BFloat16 operator+(_MLX_BFloat16 lhs, _MLX_BFloat16 rhs) { return          \n  static_cast<float>(lhs) + static_cast<float>(rhs); }; inline float                          \n  operator+(_MLX_BFloat16 lhs, float rhs) { return static_cast<float>(lhs) +                  \n  static_cast<float>(rhs); } inline float operator+(float lhs, _MLX_BFloat16 rhs) {           \n  return static_cast<float>(lhs) + static_cast<float>(rhs); }; inline double                  \n  operator+(_MLX_BFloat16 lhs, double rhs) { return static_cast<double>(lhs) +                \n  static_cast<double>(rhs); } inline double operator+(double lhs, _MLX_BFloat16 rhs) {        \n  return static_cast<double>(lhs) + static_cast<double>(rhs); }; inline _MLX_BFloat16         \n  operator+(_MLX_BFloat16 lhs, bool rhs) { return static_cast<float>(lhs) +                   \n  static_cast<float>(rhs); } inline _MLX_BFloat16 operator+(bool lhs, _MLX_BFloat16 rhs)      \n  { return static_cast<float>(lhs) + static_cast<float>(rhs); }; inline _MLX_BFloat16         \n  operator+(_MLX_BFloat16 lhs, int32_t rhs) { return static_cast<float>(lhs) +                \n  static_cast<float>(rhs); } inline _MLX_BFloat16 operator+(int32_t lhs, _MLX_BFloat16        \n  rhs) { return static_cast<float>(lhs) + static_cast<float>(rhs); }; inline                  \n  _MLX_BFloat16 operator+(_MLX_BFloat16 lhs, uint32_t rhs) { return                           \n  static_cast<float>(lhs) + static_cast<float>(rhs); } inline _MLX_BFloat16                   \n  operator+(uint32_t lhs, _MLX_BFloat16 rhs) { return static_cast<float>(lhs) +               \n  static_cast<float>(rhs); }; inline _MLX_BFloat16 operator+(_MLX_BFloat16 lhs, int64_t       \n  rhs) { return static_cast<float>(lhs) + static_cast<float>(rhs); } inline _MLX_BFloat16     \n  operator+(int64_t lhs, _MLX_BFloat16 rhs) { return static_cast<float>(lhs) +                \n  static_cast<float>(rhs); }; inline _MLX_BFloat16 operator+(_MLX_BFloat16 lhs, uint64_t      \n  rhs) { return static_cast<float>(lhs) + static_cast<float>(rhs); } inline _MLX_BFloat16     \n  operator+(uint64_t lhs, _MLX_BFloat16 rhs) { return static_cast<float>(lhs) +               \n  static_cast<float>(rhs); };;                                                                \n  |                                                                                           \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n  ^~~~~~~~                                                                                    \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:75     \n  :14: error: declaration of 'operator-' as non-function                                      \n  75 | inline float operator-(float16_t lhs, bfloat16_t rhs) { return                         \n  static_cast<float>(lhs) - static_cast<float>(rhs); } inline float operator-(bfloat16_t      \n  lhs, float16_t rhs) { return static_cast<float>(lhs) - static_cast<float>(rhs); }           \n  |              ^~~~~~~~                                                                     \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:75     \n  :24: error: 'float16_t' was not declared in this scope; did you mean 'bfloat16_t'?          \n  75 | inline float operator-(float16_t lhs, bfloat16_t rhs) { return                         \n  static_cast<float>(lhs) - static_cast<float>(rhs); } inline float operator-(bfloat16_t      \n  lhs, float16_t rhs) { return static_cast<float>(lhs) - static_cast<float>(rhs); }           \n  |                        ^~~~~~~~~                                                          \n  |                        bfloat16_t                                                         \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:75     \n  :50: error: expected primary-expression before 'rhs'                                        \n  75 | inline float operator-(float16_t lhs, bfloat16_t rhs) { return                         \n  static_cast<float>(lhs) - static_cast<float>(rhs); } inline float operator-(bfloat16_t      \n  lhs, float16_t rhs) { return static_cast<float>(lhs) - static_cast<float>(rhs); }           \n  |                                                  ^~~                                      \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:75     \n  :156: error: 'float16_t' has not been declared                                              \n  75 | inline float operator-(float16_t lhs, bfloat16_t rhs) { return                         \n  static_cast<float>(lhs) - static_cast<float>(rhs); } inline float operator-(bfloat16_t      \n  lhs, float16_t rhs) { return static_cast<float>(lhs) - static_cast<float>(rhs); }           \n  |                                                                                           \n  ^~~~~~~~~                                                                                   \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:75     \n  :130: error: ambiguating new declaration of 'float                                          \n  mlx::core::operator-(mlx::core::bfloat16_t, int)'                                           \n  75 | inline float operator-(float16_t lhs, bfloat16_t rhs) { return                         \n  static_cast<float>(lhs) - static_cast<float>(rhs); } inline float operator-(bfloat16_t      \n  lhs, float16_t rhs) { return static_cast<float>(lhs) - static_cast<float>(rhs); }           \n  |                                                                                           \n  ^~~~~~~~                                                                                    \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:47     \n  :869: note: old declaration 'mlx::core::_MLX_BFloat16                                       \n  mlx::core::operator-(mlx::core::_MLX_BFloat16, int32_t)'                                    \n  47 | inline _MLX_BFloat16 operator-(_MLX_BFloat16 lhs, _MLX_BFloat16 rhs) { return          \n  static_cast<float>(lhs) - static_cast<float>(rhs); }; inline float                          \n  operator-(_MLX_BFloat16 lhs, float rhs) { return static_cast<float>(lhs) -                  \n  static_cast<float>(rhs); } inline float operator-(float lhs, _MLX_BFloat16 rhs) {           \n  return static_cast<float>(lhs) - static_cast<float>(rhs); }; inline double                  \n  operator-(_MLX_BFloat16 lhs, double rhs) { return static_cast<double>(lhs) -                \n  static_cast<double>(rhs); } inline double operator-(double lhs, _MLX_BFloat16 rhs) {        \n  return static_cast<double>(lhs) - static_cast<double>(rhs); }; inline _MLX_BFloat16         \n  operator-(_MLX_BFloat16 lhs, bool rhs) { return static_cast<float>(lhs) -                   \n  static_cast<float>(rhs); } inline _MLX_BFloat16 operator-(bool lhs, _MLX_BFloat16 rhs)      \n  { return static_cast<float>(lhs) - static_cast<float>(rhs); }; inline _MLX_BFloat16         \n  operator-(_MLX_BFloat16 lhs, int32_t rhs) { return static_cast<float>(lhs) -                \n  static_cast<float>(rhs); } inline _MLX_BFloat16 operator-(int32_t lhs, _MLX_BFloat16        \n  rhs) { return static_cast<float>(lhs) - static_cast<float>(rhs); }; inline                  \n  _MLX_BFloat16 operator-(_MLX_BFloat16 lhs, uint32_t rhs) { return                           \n  static_cast<float>(lhs) - static_cast<float>(rhs); } inline _MLX_BFloat16                   \n  operator-(uint32_t lhs, _MLX_BFloat16 rhs) { return static_cast<float>(lhs) -               \n  static_cast<float>(rhs); }; inline _MLX_BFloat16 operator-(_MLX_BFloat16 lhs, int64_t       \n  rhs) { return static_cast<float>(lhs) - static_cast<float>(rhs); } inline _MLX_BFloat16     \n  operator-(int64_t lhs, _MLX_BFloat16 rhs) { return static_cast<float>(lhs) -                \n  static_cast<float>(rhs); }; inline _MLX_BFloat16 operator-(_MLX_BFloat16 lhs, uint64_t      \n  rhs) { return static_cast<float>(lhs) - static_cast<float>(rhs); } inline _MLX_BFloat16     \n  operator-(uint64_t lhs, _MLX_BFloat16 rhs) { return static_cast<float>(lhs) -               \n  static_cast<float>(rhs); };;                                                                \n  |                                                                                           \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n  ^~~~~~~~                                                                                    \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:76     \n  :14: error: declaration of 'operator*' as non-function                                      \n  76 | inline float operator*(float16_t lhs, bfloat16_t rhs) { return                         \n  static_cast<float>(lhs) * static_cast<float>(rhs); } inline float operator*(bfloat16_t      \n  lhs, float16_t rhs) { return static_cast<float>(lhs) * static_cast<float>(rhs); }           \n  |              ^~~~~~~~                                                                     \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:76     \n  :24: error: 'float16_t' was not declared in this scope; did you mean 'bfloat16_t'?          \n  76 | inline float operator*(float16_t lhs, bfloat16_t rhs) { return                         \n  static_cast<float>(lhs) * static_cast<float>(rhs); } inline float operator*(bfloat16_t      \n  lhs, float16_t rhs) { return static_cast<float>(lhs) * static_cast<float>(rhs); }           \n  |                        ^~~~~~~~~                                                          \n  |                        bfloat16_t                                                         \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:76     \n  :50: error: expected primary-expression before 'rhs'                                        \n  76 | inline float operator*(float16_t lhs, bfloat16_t rhs) { return                         \n  static_cast<float>(lhs) * static_cast<float>(rhs); } inline float operator*(bfloat16_t      \n  lhs, float16_t rhs) { return static_cast<float>(lhs) * static_cast<float>(rhs); }           \n  |                                                  ^~~                                      \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:76     \n  :156: error: 'float16_t' has not been declared                                              \n  76 | inline float operator*(float16_t lhs, bfloat16_t rhs) { return                         \n  static_cast<float>(lhs) * static_cast<float>(rhs); } inline float operator*(bfloat16_t      \n  lhs, float16_t rhs) { return static_cast<float>(lhs) * static_cast<float>(rhs); }           \n  |                                                                                           \n  ^~~~~~~~~                                                                                   \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:76     \n  :130: error: ambiguating new declaration of 'float                                          \n  mlx::core::operator*(mlx::core::bfloat16_t, int)'                                           \n  76 | inline float operator*(float16_t lhs, bfloat16_t rhs) { return                         \n  static_cast<float>(lhs) * static_cast<float>(rhs); } inline float operator*(bfloat16_t      \n  lhs, float16_t rhs) { return static_cast<float>(lhs) * static_cast<float>(rhs); }           \n  |                                                                                           \n  ^~~~~~~~                                                                                    \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:48     \n  :869: note: old declaration 'mlx::core::_MLX_BFloat16                                       \n  mlx::core::operator*(mlx::core::_MLX_BFloat16, int32_t)'                                    \n  48 | inline _MLX_BFloat16 operator*(_MLX_BFloat16 lhs, _MLX_BFloat16 rhs) { return          \n  static_cast<float>(lhs) * static_cast<float>(rhs); }; inline float                          \n  operator*(_MLX_BFloat16 lhs, float rhs) { return static_cast<float>(lhs) *                  \n  static_cast<float>(rhs); } inline float operator*(float lhs, _MLX_BFloat16 rhs) {           \n  return static_cast<float>(lhs) * static_cast<float>(rhs); }; inline double                  \n  operator*(_MLX_BFloat16 lhs, double rhs) { return static_cast<double>(lhs) *                \n  static_cast<double>(rhs); } inline double operator*(double lhs, _MLX_BFloat16 rhs) {        \n  return static_cast<double>(lhs) * static_cast<double>(rhs); }; inline _MLX_BFloat16         \n  operator*(_MLX_BFloat16 lhs, bool rhs) { return static_cast<float>(lhs) *                   \n  static_cast<float>(rhs); } inline _MLX_BFloat16 operator*(bool lhs, _MLX_BFloat16 rhs)      \n  { return static_cast<float>(lhs) * static_cast<float>(rhs); }; inline _MLX_BFloat16         \n  operator*(_MLX_BFloat16 lhs, int32_t rhs) { return static_cast<float>(lhs) *                \n  static_cast<float>(rhs); } inline _MLX_BFloat16 operator*(int32_t lhs, _MLX_BFloat16        \n  rhs) { return static_cast<float>(lhs) * static_cast<float>(rhs); }; inline                  \n  _MLX_BFloat16 operator*(_MLX_BFloat16 lhs, uint32_t rhs) { return                           \n  static_cast<float>(lhs) * static_cast<float>(rhs); } inline _MLX_BFloat16                   \n  operator*(uint32_t lhs, _MLX_BFloat16 rhs) { return static_cast<float>(lhs) *               \n  static_cast<float>(rhs); }; inline _MLX_BFloat16 operator*(_MLX_BFloat16 lhs, int64_t       \n  rhs) { return static_cast<float>(lhs) * static_cast<float>(rhs); } inline _MLX_BFloat16     \n  operator*(int64_t lhs, _MLX_BFloat16 rhs) { return static_cast<float>(lhs) *                \n  static_cast<float>(rhs); }; inline _MLX_BFloat16 operator*(_MLX_BFloat16 lhs, uint64_t      \n  rhs) { return static_cast<float>(lhs) * static_cast<float>(rhs); } inline _MLX_BFloat16     \n  operator*(uint64_t lhs, _MLX_BFloat16 rhs) { return static_cast<float>(lhs) *               \n  static_cast<float>(rhs); };;                                                                \n  |                                                                                           \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n  ^~~~~~~~                                                                                    \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:77     \n  :14: error: declaration of 'operator/' as non-function                                      \n  77 | inline float operator/(float16_t lhs, bfloat16_t rhs) { return                         \n  static_cast<float>(lhs) / static_cast<float>(rhs); } inline float operator/(bfloat16_t      \n  lhs, float16_t rhs) { return static_cast<float>(lhs) / static_cast<float>(rhs); }           \n  |              ^~~~~~~~                                                                     \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:77     \n  :24: error: 'float16_t' was not declared in this scope; did you mean 'bfloat16_t'?          \n  77 | inline float operator/(float16_t lhs, bfloat16_t rhs) { return                         \n  static_cast<float>(lhs) / static_cast<float>(rhs); } inline float operator/(bfloat16_t      \n  lhs, float16_t rhs) { return static_cast<float>(lhs) / static_cast<float>(rhs); }           \n  |                        ^~~~~~~~~                                                          \n  |                        bfloat16_t                                                         \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:77     \n  :50: error: expected primary-expression before 'rhs'                                        \n  77 | inline float operator/(float16_t lhs, bfloat16_t rhs) { return                         \n  static_cast<float>(lhs) / static_cast<float>(rhs); } inline float operator/(bfloat16_t      \n  lhs, float16_t rhs) { return static_cast<float>(lhs) / static_cast<float>(rhs); }           \n  |                                                  ^~~                                      \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:77     \n  :156: error: 'float16_t' has not been declared                                              \n  77 | inline float operator/(float16_t lhs, bfloat16_t rhs) { return                         \n  static_cast<float>(lhs) / static_cast<float>(rhs); } inline float operator/(bfloat16_t      \n  lhs, float16_t rhs) { return static_cast<float>(lhs) / static_cast<float>(rhs); }           \n  |                                                                                           \n  ^~~~~~~~~                                                                                   \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:77     \n  :130: error: ambiguating new declaration of 'float                                          \n  mlx::core::operator/(mlx::core::bfloat16_t, int)'                                           \n  77 | inline float operator/(float16_t lhs, bfloat16_t rhs) { return                         \n  static_cast<float>(lhs) / static_cast<float>(rhs); } inline float operator/(bfloat16_t      \n  lhs, float16_t rhs) { return static_cast<float>(lhs) / static_cast<float>(rhs); }           \n  |                                                                                           \n  ^~~~~~~~                                                                                    \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:49     \n  :869: note: old declaration 'mlx::core::_MLX_BFloat16                                       \n  mlx::core::operator/(mlx::core::_MLX_BFloat16, int32_t)'                                    \n  49 | inline _MLX_BFloat16 operator/(_MLX_BFloat16 lhs, _MLX_BFloat16 rhs) { return          \n  static_cast<float>(lhs) / static_cast<float>(rhs); }; inline float                          \n  operator/(_MLX_BFloat16 lhs, float rhs) { return static_cast<float>(lhs) /                  \n  static_cast<float>(rhs); } inline float operator/(float lhs, _MLX_BFloat16 rhs) {           \n  return static_cast<float>(lhs) / static_cast<float>(rhs); }; inline double                  \n  operator/(_MLX_BFloat16 lhs, double rhs) { return static_cast<double>(lhs) /                \n  static_cast<double>(rhs); } inline double operator/(double lhs, _MLX_BFloat16 rhs) {        \n  return static_cast<double>(lhs) / static_cast<double>(rhs); }; inline _MLX_BFloat16         \n  operator/(_MLX_BFloat16 lhs, bool rhs) { return static_cast<float>(lhs) /                   \n  static_cast<float>(rhs); } inline _MLX_BFloat16 operator/(bool lhs, _MLX_BFloat16 rhs)      \n  { return static_cast<float>(lhs) / static_cast<float>(rhs); }; inline _MLX_BFloat16         \n  operator/(_MLX_BFloat16 lhs, int32_t rhs) { return static_cast<float>(lhs) /                \n  static_cast<float>(rhs); } inline _MLX_BFloat16 operator/(int32_t lhs, _MLX_BFloat16        \n  rhs) { return static_cast<float>(lhs) / static_cast<float>(rhs); }; inline                  \n  _MLX_BFloat16 operator/(_MLX_BFloat16 lhs, uint32_t rhs) { return                           \n  static_cast<float>(lhs) / static_cast<float>(rhs); } inline _MLX_BFloat16                   \n  operator/(uint32_t lhs, _MLX_BFloat16 rhs) { return static_cast<float>(lhs) /               \n  static_cast<float>(rhs); }; inline _MLX_BFloat16 operator/(_MLX_BFloat16 lhs, int64_t       \n  rhs) { return static_cast<float>(lhs) / static_cast<float>(rhs); } inline _MLX_BFloat16     \n  operator/(int64_t lhs, _MLX_BFloat16 rhs) { return static_cast<float>(lhs) /                \n  static_cast<float>(rhs); }; inline _MLX_BFloat16 operator/(_MLX_BFloat16 lhs, uint64_t      \n  rhs) { return static_cast<float>(lhs) / static_cast<float>(rhs); } inline _MLX_BFloat16     \n  operator/(uint64_t lhs, _MLX_BFloat16 rhs) { return static_cast<float>(lhs) /               \n  static_cast<float>(rhs); };;                                                                \n  |                                                                                           \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n  ^~~~~~~~                                                                                    \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:13     \n  7:1503: error: declaration of 'operator+' as non-function                                   \n  137 | inline complex64_t operator+(const std::complex<float>& x, const complex64_t&         \n  y) { return x + static_cast<std::complex<float>>(y); } inline complex64_t                   \n  operator+(const complex64_t& x, const std::complex<float>& y) { return                      \n  static_cast<std::complex<float>>(x) + y; } inline complex64_t operator+(const               \n  complex64_t& x, const complex64_t& y) { return static_cast<std::complex<float>>(x) +        \n  static_cast<std::complex<float>>(y); } inline complex64_t operator+(bool x, const           \n  complex64_t& y) { return static_cast<complex64_t>(x) + y; } inline complex64_t              \n  operator+(const complex64_t& x, bool y) { return x + static_cast<complex64_t>(y); }         \n  inline complex64_t operator+(uint32_t x, const complex64_t& y) { return                     \n  static_cast<complex64_t>(x) + y; } inline complex64_t operator+(const complex64_t& x,       \n  uint32_t y) { return x + static_cast<complex64_t>(y); } inline complex64_t                  \n  operator+(uint64_t x, const complex64_t& y) { return static_cast<complex64_t>(x) + y; }     \n  inline complex64_t operator+(const complex64_t& x, uint64_t y) { return x +                 \n  static_cast<complex64_t>(y); } inline complex64_t operator+(int32_t x, const                \n  complex64_t& y) { return static_cast<complex64_t>(x) + y; } inline complex64_t              \n  operator+(const complex64_t& x, int32_t y) { return x + static_cast<complex64_t>(y); }      \n  inline complex64_t operator+(int64_t x, const complex64_t& y) { return                      \n  static_cast<complex64_t>(x) + y; } inline complex64_t operator+(const complex64_t& x,       \n  int64_t y) { return x + static_cast<complex64_t>(y); } inline complex64_t                   \n  operator+(float16_t x, const complex64_t& y) { return static_cast<complex64_t>(x) + y;      \n  } inline complex64_t operator+(const complex64_t& x, float16_t y) { return x +              \n  static_cast<complex64_t>(y); } inline complex64_t operator+(bfloat16_t x, const             \n  complex64_t& y) { return static_cast<complex64_t>(x) + y; } inline complex64_t              \n  operator+(const complex64_t& x, bfloat16_t y) { return x + static_cast<complex64_t>(y);     \n  } inline complex64_t operator+(float x, const complex64_t& y) { return                      \n  static_cast<complex64_t>(x) + y; } inline complex64_t operator+(const complex64_t& x,       \n  float y) { return x + static_cast<complex64_t>(y); }                                        \n  |                                                                                           \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n  ^~~~~~~~                                                                                    \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:13     \n  7:1513: error: 'float16_t' was not declared in this scope; did you mean 'bfloat16_t'?       \n  137 | inline complex64_t operator+(const std::complex<float>& x, const complex64_t&         \n  y) { return x + static_cast<std::complex<float>>(y); } inline complex64_t                   \n  operator+(const complex64_t& x, const std::complex<float>& y) { return                      \n  static_cast<std::complex<float>>(x) + y; } inline complex64_t operator+(const               \n  complex64_t& x, const complex64_t& y) { return static_cast<std::complex<float>>(x) +        \n  static_cast<std::complex<float>>(y); } inline complex64_t operator+(bool x, const           \n  complex64_t& y) { return static_cast<complex64_t>(x) + y; } inline complex64_t              \n  operator+(const complex64_t& x, bool y) { return x + static_cast<complex64_t>(y); }         \n  inline complex64_t operator+(uint32_t x, const complex64_t& y) { return                     \n  static_cast<complex64_t>(x) + y; } inline complex64_t operator+(const complex64_t& x,       \n  uint32_t y) { return x + static_cast<complex64_t>(y); } inline complex64_t                  \n  operator+(uint64_t x, const complex64_t& y) { return static_cast<complex64_t>(x) + y; }     \n  inline complex64_t operator+(const complex64_t& x, uint64_t y) { return x +                 \n  static_cast<complex64_t>(y); } inline complex64_t operator+(int32_t x, const                \n  complex64_t& y) { return static_cast<complex64_t>(x) + y; } inline complex64_t              \n  operator+(const complex64_t& x, int32_t y) { return x + static_cast<complex64_t>(y); }      \n  inline complex64_t operator+(int64_t x, const complex64_t& y) { return                      \n  static_cast<complex64_t>(x) + y; } inline complex64_t operator+(const complex64_t& x,       \n  int64_t y) { return x + static_cast<complex64_t>(y); } inline complex64_t                   \n  operator+(float16_t x, const complex64_t& y) { return static_cast<complex64_t>(x) + y;      \n  } inline complex64_t operator+(const complex64_t& x, float16_t y) { return x +              \n  static_cast<complex64_t>(y); } inline complex64_t operator+(bfloat16_t x, const             \n  complex64_t& y) { return static_cast<complex64_t>(x) + y; } inline complex64_t              \n  operator+(const complex64_t& x, bfloat16_t y) { return x + static_cast<complex64_t>(y);     \n  } inline complex64_t operator+(float x, const complex64_t& y) { return                      \n  static_cast<complex64_t>(x) + y; } inline complex64_t operator+(const complex64_t& x,       \n  float y) { return x + static_cast<complex64_t>(y); }                                        \n  |                                                                                           \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n  ^~~~~~~~~                                                                                   \n  |                                                                                           \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n  bfloat16_t                                                                                  \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:13     \n  7:1526: error: expected primary-expression before 'const'                                   \n  137 | inline complex64_t operator+(const std::complex<float>& x, const complex64_t&         \n  y) { return x + static_cast<std::complex<float>>(y); } inline complex64_t                   \n  operator+(const complex64_t& x, const std::complex<float>& y) { return                      \n  static_cast<std::complex<float>>(x) + y; } inline complex64_t operator+(const               \n  complex64_t& x, const complex64_t& y) { return static_cast<std::complex<float>>(x) +        \n  static_cast<std::complex<float>>(y); } inline complex64_t operator+(bool x, const           \n  complex64_t& y) { return static_cast<complex64_t>(x) + y; } inline complex64_t              \n  operator+(const complex64_t& x, bool y) { return x + static_cast<complex64_t>(y); }         \n  inline complex64_t operator+(uint32_t x, const complex64_t& y) { return                     \n  static_cast<complex64_t>(x) + y; } inline complex64_t operator+(const complex64_t& x,       \n  uint32_t y) { return x + static_cast<complex64_t>(y); } inline complex64_t                  \n  operator+(uint64_t x, const complex64_t& y) { return static_cast<complex64_t>(x) + y; }     \n  inline complex64_t operator+(const complex64_t& x, uint64_t y) { return x +                 \n  static_cast<complex64_t>(y); } inline complex64_t operator+(int32_t x, const                \n  complex64_t& y) { return static_cast<complex64_t>(x) + y; } inline complex64_t              \n  operator+(const complex64_t& x, int32_t y) { return x + static_cast<complex64_t>(y); }      \n  inline complex64_t operator+(int64_t x, const complex64_t& y) { return                      \n  static_cast<complex64_t>(x) + y; } inline complex64_t operator+(const complex64_t& x,       \n  int64_t y) { return x + static_cast<complex64_t>(y); } inline complex64_t                   \n  operator+(float16_t x, const complex64_t& y) { return static_cast<complex64_t>(x) + y;      \n  } inline complex64_t operator+(const complex64_t& x, float16_t y) { return x +              \n  static_cast<complex64_t>(y); } inline complex64_t operator+(bfloat16_t x, const             \n  complex64_t& y) { return static_cast<complex64_t>(x) + y; } inline complex64_t              \n  operator+(const complex64_t& x, bfloat16_t y) { return x + static_cast<complex64_t>(y);     \n  } inline complex64_t operator+(float x, const complex64_t& y) { return                      \n  static_cast<complex64_t>(x) + y; } inline complex64_t operator+(const complex64_t& x,       \n  float y) { return x + static_cast<complex64_t>(y); }                                        \n  |                                                                                           \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n  ^~~~~                                                                                       \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:13     \n  7:1643: error: 'float16_t' has not been declared                                            \n  137 | inline complex64_t operator+(const std::complex<float>& x, const complex64_t&         \n  y) { return x + static_cast<std::complex<float>>(y); } inline complex64_t                   \n  operator+(const complex64_t& x, const std::complex<float>& y) { return                      \n  static_cast<std::complex<float>>(x) + y; } inline complex64_t operator+(const               \n  complex64_t& x, const complex64_t& y) { return static_cast<std::complex<float>>(x) +        \n  static_cast<std::complex<float>>(y); } inline complex64_t operator+(bool x, const           \n  complex64_t& y) { return static_cast<complex64_t>(x) + y; } inline complex64_t              \n  operator+(const complex64_t& x, bool y) { return x + static_cast<complex64_t>(y); }         \n  inline complex64_t operator+(uint32_t x, const complex64_t& y) { return                     \n  static_cast<complex64_t>(x) + y; } inline complex64_t operator+(const complex64_t& x,       \n  uint32_t y) { return x + static_cast<complex64_t>(y); } inline complex64_t                  \n  operator+(uint64_t x, const complex64_t& y) { return static_cast<complex64_t>(x) + y; }     \n  inline complex64_t operator+(const complex64_t& x, uint64_t y) { return x +                 \n  static_cast<complex64_t>(y); } inline complex64_t operator+(int32_t x, const                \n  complex64_t& y) { return static_cast<complex64_t>(x) + y; } inline complex64_t              \n  operator+(const complex64_t& x, int32_t y) { return x + static_cast<complex64_t>(y); }      \n  inline complex64_t operator+(int64_t x, const complex64_t& y) { return                      \n  static_cast<complex64_t>(x) + y; } inline complex64_t operator+(const complex64_t& x,       \n  int64_t y) { return x + static_cast<complex64_t>(y); } inline complex64_t                   \n  operator+(float16_t x, const complex64_t& y) { return static_cast<complex64_t>(x) + y;      \n  } inline complex64_t operator+(const complex64_t& x, float16_t y) { return x +              \n  static_cast<complex64_t>(y); } inline complex64_t operator+(bfloat16_t x, const             \n  complex64_t& y) { return static_cast<complex64_t>(x) + y; } inline complex64_t              \n  operator+(const complex64_t& x, bfloat16_t y) { return x + static_cast<complex64_t>(y);     \n  } inline complex64_t operator+(float x, const complex64_t& y) { return                      \n  static_cast<complex64_t>(x) + y; } inline complex64_t operator+(const complex64_t& x,       \n  float y) { return x + static_cast<complex64_t>(y); }                                        \n  |                                                                                           \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n  ^~~~~~~~~                                                                                   \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:13     \n  7:1611: error: redefinition of 'mlx::core::complex64_t mlx::core::operator+(const           \n  mlx::core::complex64_t&, int)'                                                              \n  137 | inline complex64_t operator+(const std::complex<float>& x, const complex64_t&         \n  y) { return x + static_cast<std::complex<float>>(y); } inline complex64_t                   \n  operator+(const complex64_t& x, const std::complex<float>& y) { return                      \n  static_cast<std::complex<float>>(x) + y; } inline complex64_t operator+(const               \n  complex64_t& x, const complex64_t& y) { return static_cast<std::complex<float>>(x) +        \n  static_cast<std::complex<float>>(y); } inline complex64_t operator+(bool x, const           \n  complex64_t& y) { return static_cast<complex64_t>(x) + y; } inline complex64_t              \n  operator+(const complex64_t& x, bool y) { return x + static_cast<complex64_t>(y); }         \n  inline complex64_t operator+(uint32_t x, const complex64_t& y) { return                     \n  static_cast<complex64_t>(x) + y; } inline complex64_t operator+(const complex64_t& x,       \n  uint32_t y) { return x + static_cast<complex64_t>(y); } inline complex64_t                  \n  operator+(uint64_t x, const complex64_t& y) { return static_cast<complex64_t>(x) + y; }     \n  inline complex64_t operator+(const complex64_t& x, uint64_t y) { return x +                 \n  static_cast<complex64_t>(y); } inline complex64_t operator+(int32_t x, const                \n  complex64_t& y) { return static_cast<complex64_t>(x) + y; } inline complex64_t              \n  operator+(const complex64_t& x, int32_t y) { return x + static_cast<complex64_t>(y); }      \n  inline complex64_t operator+(int64_t x, const complex64_t& y) { return                      \n  static_cast<complex64_t>(x) + y; } inline complex64_t operator+(const complex64_t& x,       \n  int64_t y) { return x + static_cast<complex64_t>(y); } inline complex64_t                   \n  operator+(float16_t x, const complex64_t& y) { return static_cast<complex64_t>(x) + y;      \n  } inline complex64_t operator+(const complex64_t& x, float16_t y) { return x +              \n  static_cast<complex64_t>(y); } inline complex64_t operator+(bfloat16_t x, const             \n  complex64_t& y) { return static_cast<complex64_t>(x) + y; } inline complex64_t              \n  operator+(const complex64_t& x, bfloat16_t y) { return x + static_cast<complex64_t>(y);     \n  } inline complex64_t operator+(float x, const complex64_t& y) { return                      \n  static_cast<complex64_t>(x) + y; } inline complex64_t operator+(const complex64_t& x,       \n  float y) { return x + static_cast<complex64_t>(y); }                                        \n  |                                                                                           \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n  ^~~~~~~~                                                                                    \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:13     \n  7:1185: note: 'mlx::core::complex64_t mlx::core::operator+(const                            \n  mlx::core::complex64_t&, int32_t)' previously defined here                                  \n  137 | inline complex64_t operator+(const std::complex<float>& x, const complex64_t&         \n  y) { return x + static_cast<std::complex<float>>(y); } inline complex64_t                   \n  operator+(const complex64_t& x, const std::complex<float>& y) { return                      \n  static_cast<std::complex<float>>(x) + y; } inline complex64_t operator+(const               \n  complex64_t& x, const complex64_t& y) { return static_cast<std::complex<float>>(x) +        \n  static_cast<std::complex<float>>(y); } inline complex64_t operator+(bool x, const           \n  complex64_t& y) { return static_cast<complex64_t>(x) + y; } inline complex64_t              \n  operator+(const complex64_t& x, bool y) { return x + static_cast<complex64_t>(y); }         \n  inline complex64_t operator+(uint32_t x, const complex64_t& y) { return                     \n  static_cast<complex64_t>(x) + y; } inline complex64_t operator+(const complex64_t& x,       \n  uint32_t y) { return x + static_cast<complex64_t>(y); } inline complex64_t                  \n  operator+(uint64_t x, const complex64_t& y) { return static_cast<complex64_t>(x) + y; }     \n  inline complex64_t operator+(const complex64_t& x, uint64_t y) { return x +                 \n  static_cast<complex64_t>(y); } inline complex64_t operator+(int32_t x, const                \n  complex64_t& y) { return static_cast<complex64_t>(x) + y; } inline complex64_t              \n  operator+(const complex64_t& x, int32_t y) { return x + static_cast<complex64_t>(y); }      \n  inline complex64_t operator+(int64_t x, const complex64_t& y) { return                      \n  static_cast<complex64_t>(x) + y; } inline complex64_t operator+(const complex64_t& x,       \n  int64_t y) { return x + static_cast<complex64_t>(y); } inline complex64_t                   \n  operator+(float16_t x, const complex64_t& y) { return static_cast<complex64_t>(x) + y;      \n  } inline complex64_t operator+(const complex64_t& x, float16_t y) { return x +              \n  static_cast<complex64_t>(y); } inline complex64_t operator+(bfloat16_t x, const             \n  complex64_t& y) { return static_cast<complex64_t>(x) + y; } inline complex64_t              \n  operator+(const complex64_t& x, bfloat16_t y) { return x + static_cast<complex64_t>(y);     \n  } inline complex64_t operator+(float x, const complex64_t& y) { return                      \n  static_cast<complex64_t>(x) + y; } inline complex64_t operator+(const complex64_t& x,       \n  float y) { return x + static_cast<complex64_t>(y); }                                        \n  |                                                                                           \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n                                                                                              \n  ^~~~~~~~                                                                                    \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:       \n  In function 'mlx::core::simd::Simd<T, 1>                                                    \n  mlx::core::simd::clamp(mlx::core::simd::Simd<T, 1>, mlx::core::simd::Simd<T, 1>,            \n  mlx::core::simd::Simd<T, 1>)':                                                              \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:34     \n  2:15: error: 'clamp' is not a member of 'std'; did you mean 'mlx::core::simd::clamp'?       \n  342 |   return std::clamp(v.value, min.value, max.value);                                   \n  |               ^~~~~                                                                       \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:34     \n  1:12: note: 'mlx::core::simd::clamp' declared here                                          \n  341 | Simd<T, 1> clamp(Simd<T, 1> v, Simd<T, 1> min, Simd<T, 1> max) {                      \n  |            ^~~~~                                                                          \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:       \n  In instantiation of 'mlx::core::simd::Simd<float, N>                                        \n  mlx::core::detail::fp32_from_bits(mlx::core::simd::Simd<unsigned int, N>) [with int N =     \n  1]':                                                                                        \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:62     \n  0:26:   required from 'mlx::core::simd::Simd<float, N>                                      \n  mlx::core::detail::FromFP8::operator()(mlx::core::simd::Simd<unsigned char, N>) [with       \n  int N = 1]'                                                                                 \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:62     \n  3:19:   required from here                                                                  \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:56     \n  8:11: warning: dereferencing type-punned pointer will break strict-aliasing rules           \n  [-Wstrict-aliasing]                                                                         \n  568 |   return *(Simd<float, N>*)(&x);                                                      \n  |           ^~~~~~~~~~~~~~~~~~~~~                                                           \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:56     \n  8:11: warning: dereferencing type-punned pointer will break strict-aliasing rules           \n  [-Wstrict-aliasing]                                                                         \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:       \n  In instantiation of 'mlx::core::simd::Simd<T, N>                                            \n  mlx::core::simd::exp(mlx::core::simd::Simd<T, N>) [with T = float; int N = 1]':             \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:53     \n  8:38:   required from 'mlx::core::simd::Simd<T, N>                                          \n  mlx::core::detail::Sigmoid::operator()(mlx::core::simd::Simd<T, N>) [with int N = 1; T      \n  = float]'                                                                                   \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:54     \n  1:59:   required from 'T mlx::core::detail::Sigmoid::operator()(T) [with T = float]'        \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:69     \n  5:26:   required from here                                                                  \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:37     \n  6:51: warning: dereferencing type-punned pointer will break strict-aliasing rules           \n  [-Wstrict-aliasing]                                                                         \n  376 |     auto result = select(isnan(x_init), x_init, (*(Simd<float, N>*)&epart) *          \n  x);                                                                                         \n  |                                                   ^~~~~~~~~~~~~~~~~~~~~~~                 \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:37     \n  6:51: warning: dereferencing type-punned pointer will break strict-aliasing rules           \n  [-Wstrict-aliasing]                                                                         \n  /tmp/mlx/0.24.2/cpu/Bf4ISigmoidACf4OMultiplyAB_V__6142509188972423790_contiguous.cpp:25     \n  6:65: note:   initializing argument 1 of 'mlx::core::simd::Simd<decltype ((a.value *        \n  b.value)), 1> mlx::core::simd::operator*(mlx::core::simd::Simd<T, 1>,                       \n  mlx::core::simd::Simd<T2, 1>) [with T1 = float; T2 = float; decltype ((a.value *            \n  b.value)) = float]'                                                                         \n  256 | template <typename T1, typename T2> auto operator *(Simd<T1, 1> a, Simd<T2, 1>        \n  b) ->Simd<decltype(a.value * b.value), 1> { return a.value * b.value; } template            \n  <typename T1, typename T2> auto operator *(T1 a, Simd<T2, 1> b)->Simd<decltype(a *          \n  b.value), 1> { return a * b.value; } template <typename T1, typename T2> auto operator      \n  *(Simd<T1, 1> a, T2 b)->Simd<decltype(a.value * b), 1> { return a.value * b; }              \n  |                                                     ~~~~~~~~~~~~^ at                      \n  /app/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/transforms.cpp:15\n```","reactions":{"url":"https://api.github.com/repos/ml-explore/mlx/issues/3080/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/ml-explore/mlx/issues/3080/timeline","performed_via_github_app":null,"state_reason":"completed","pinned_comment":null,"score":1.0},{"url":"https://api.github.com/repos/ml-explore/mlx/issues/1277","repository_url":"https://api.github.com/repos/ml-explore/mlx","labels_url":"https://api.github.com/repos/ml-explore/mlx/issues/1277/labels{/name}","comments_url":"https://api.github.com/repos/ml-explore/mlx/issues/1277/comments","events_url":"https://api.github.com/repos/ml-explore/mlx/issues/1277/events","html_url":"https://github.com/ml-explore/mlx/issues/1277","id":2421141933,"node_id":"I_kwDOKzRn186QT7Gt","number":1277,"title":"[BUG] expm1 handling of overflow / underflow causes wrong results","user":{"login":"tgymnich","id":7985149,"node_id":"MDQ6VXNlcjc5ODUxNDk=","avatar_url":"https://avatars.githubusercontent.com/u/7985149?v=4","gravatar_id":"","url":"https://api.github.com/users/tgymnich","html_url":"https://github.com/tgymnich","followers_url":"https://api.github.com/users/tgymnich/followers","following_url":"https://api.github.com/users/tgymnich/following{/other_user}","gists_url":"https://api.github.com/users/tgymnich/gists{/gist_id}","starred_url":"https://api.github.com/users/tgymnich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgymnich/subscriptions","organizations_url":"https://api.github.com/users/tgymnich/orgs","repos_url":"https://api.github.com/users/tgymnich/repos","events_url":"https://api.github.com/users/tgymnich/events{/privacy}","received_events_url":"https://api.github.com/users/tgymnich/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[],"state":"closed","locked":false,"assignees":[],"milestone":null,"comments":0,"created_at":"2024-07-21T00:26:33Z","updated_at":"2024-07-23T14:28:49Z","closed_at":"2024-07-23T14:28:49Z","assignee":null,"author_association":"CONTRIBUTOR","issue_field_values":[],"type":null,"active_lock_reason":null,"sub_issues_summary":{"total":0,"completed":0,"percent_completed":0},"issue_dependencies_summary":{"blocked_by":0,"total_blocked_by":0,"blocking":0,"total_blocking":0},"body":"**Describe the bug**\r\nHandling of overflow / underflow in `expm1` causes wrong results.\r\n\r\nThe overflow handling in expm1f.h is missing one line from the [original](https://forums.developer.nvidia.com/t/a-faster-and-more-accurate-implementation-of-expm1f/48085/2):\r\nhttps://github.com/ml-explore/mlx/blob/df124e018abc4f4bea3d20eb9aeddf7188651de3/mlx/backend/metal/kernels/expm1f.h#L85-L87\r\n\r\nHow it should be:\r\n```c\r\n  if (abs(a - 1.0f) > 88.0f) {\r\n    r = pow(2, a);\r\n    r = fma(r, r, -1.0f);\r\n  }\r\n```\r\n**To Reproduce**\r\n\r\n```python\r\nimport mlx.core as mx\r\n\r\na = mx.array([-88.0, -86.0, -0.1, 0.0, 0.1, 87.0, 89.0, 90.0])\r\n\r\nmx.expm1(a)\r\n```\r\nWrong result (0 and NaN at the beginning and end):\r\n```\r\narray([0, -1, -0.0951626, ..., 6.07712e+37, inf, nan], dtype=float32)\r\n```\r\n\r\n**Expected behavior**\r\n\r\n```python\r\n>>> a = np.array([-88.0, -86.0, -0.1, 0.0, 0.1, 87.0, 89.0], dtype=np.float32)\r\n>>> np.expm1(a)\r\n<stdin>:1: RuntimeWarning: overflow encountered in expm1\r\narray([-1.0000000e+00, -1.0000000e+00, -9.5162585e-02,  0.0000000e+00, 1.0517092e-01,  6.0760303e+37, inf], dtype=float32)\r\n```\r\n\r\n\r\n**Desktop (please complete the following information):**\r\n - OS Version: [e.g. MacOS 14.5]\r\n - Version [e.g. 0.16.0]\r\n\r\n**Additional context**\r\n","reactions":{"url":"https://api.github.com/repos/ml-explore/mlx/issues/1277/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/ml-explore/mlx/issues/1277/timeline","performed_via_github_app":null,"state_reason":"completed","pinned_comment":null,"score":1.0},{"url":"https://api.github.com/repos/ml-explore/mlx/issues/1281","repository_url":"https://api.github.com/repos/ml-explore/mlx","labels_url":"https://api.github.com/repos/ml-explore/mlx/issues/1281/labels{/name}","comments_url":"https://api.github.com/repos/ml-explore/mlx/issues/1281/comments","events_url":"https://api.github.com/repos/ml-explore/mlx/issues/1281/events","html_url":"https://github.com/ml-explore/mlx/pull/1281","id":2425589383,"node_id":"PR_kwDOKzRn1852PIuh","number":1281,"title":"Fix tests on main + some minor improvements","user":{"login":"awni","id":1542805,"node_id":"MDQ6VXNlcjE1NDI4MDU=","avatar_url":"https://avatars.githubusercontent.com/u/1542805?v=4","gravatar_id":"","url":"https://api.github.com/users/awni","html_url":"https://github.com/awni","followers_url":"https://api.github.com/users/awni/followers","following_url":"https://api.github.com/users/awni/following{/other_user}","gists_url":"https://api.github.com/users/awni/gists{/gist_id}","starred_url":"https://api.github.com/users/awni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awni/subscriptions","organizations_url":"https://api.github.com/users/awni/orgs","repos_url":"https://api.github.com/users/awni/repos","events_url":"https://api.github.com/users/awni/events{/privacy}","received_events_url":"https://api.github.com/users/awni/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[],"state":"closed","locked":false,"assignees":[],"milestone":null,"comments":0,"created_at":"2024-07-23T16:11:47Z","updated_at":"2024-07-23T18:49:07Z","closed_at":"2024-07-23T18:49:05Z","assignee":null,"author_association":"MEMBER","issue_field_values":[],"type":null,"active_lock_reason":null,"draft":false,"pull_request":{"url":"https://api.github.com/repos/ml-explore/mlx/pulls/1281","html_url":"https://github.com/ml-explore/mlx/pull/1281","diff_url":"https://github.com/ml-explore/mlx/pull/1281.diff","patch_url":"https://github.com/ml-explore/mlx/pull/1281.patch","merged_at":"2024-07-23T18:49:05Z"},"body":"- Fix expm1 tolerances and building\r\n- Improve MPI build for case when MPI is found but not available (e.g. installed in a different python environment)\r\n- Typo in pad op","reactions":{"url":"https://api.github.com/repos/ml-explore/mlx/issues/1281/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/ml-explore/mlx/issues/1281/timeline","performed_via_github_app":null,"state_reason":null,"score":1.0},{"url":"https://api.github.com/repos/ml-explore/mlx/issues/973","repository_url":"https://api.github.com/repos/ml-explore/mlx","labels_url":"https://api.github.com/repos/ml-explore/mlx/issues/973/labels{/name}","comments_url":"https://api.github.com/repos/ml-explore/mlx/issues/973/comments","events_url":"https://api.github.com/repos/ml-explore/mlx/issues/973/events","html_url":"https://github.com/ml-explore/mlx/pull/973","id":2229997029,"node_id":"PR_kwDOKzRn185r8iyf","number":973,"title":"std and expm1","user":{"login":"awni","id":1542805,"node_id":"MDQ6VXNlcjE1NDI4MDU=","avatar_url":"https://avatars.githubusercontent.com/u/1542805?v=4","gravatar_id":"","url":"https://api.github.com/users/awni","html_url":"https://github.com/awni","followers_url":"https://api.github.com/users/awni/followers","following_url":"https://api.github.com/users/awni/following{/other_user}","gists_url":"https://api.github.com/users/awni/gists{/gist_id}","starred_url":"https://api.github.com/users/awni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awni/subscriptions","organizations_url":"https://api.github.com/users/awni/orgs","repos_url":"https://api.github.com/users/awni/repos","events_url":"https://api.github.com/users/awni/events{/privacy}","received_events_url":"https://api.github.com/users/awni/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[],"state":"closed","locked":false,"assignees":[],"milestone":null,"comments":1,"created_at":"2024-04-07T23:00:12Z","updated_at":"2024-04-08T21:26:02Z","closed_at":"2024-04-08T21:26:01Z","assignee":null,"author_association":"MEMBER","issue_field_values":[],"type":null,"active_lock_reason":null,"draft":false,"pull_request":{"url":"https://api.github.com/repos/ml-explore/mlx/pulls/973","html_url":"https://github.com/ml-explore/mlx/pull/973","diff_url":"https://github.com/ml-explore/mlx/pull/973.diff","patch_url":"https://github.com/ml-explore/mlx/pull/973.patch","merged_at":"2024-04-08T21:26:01Z"},"body":"## Proposed changes\r\n\r\n- `mx.std`\r\n- `mx.expm1`","reactions":{"url":"https://api.github.com/repos/ml-explore/mlx/issues/973/reactions","total_count":2,"+1":2,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/ml-explore/mlx/issues/973/timeline","performed_via_github_app":null,"state_reason":null,"score":1.0}],"search_type":"lexical"}