Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getting segmentation fault when running the basic example #3

Open
capaj opened this issue May 24, 2023 · 1 comment
Open

getting segmentation fault when running the basic example #3

capaj opened this issue May 24, 2023 · 1 comment

Comments

@capaj
Copy link

capaj commented May 24, 2023

I am getting

3
[1]    67813 segmentation fault  node test.mjs

I am running just the sample from the readme:

import { Context, F } from 'ggml-js/core'

// Create context, two 1D tensors and multiply them
const ctx = Context.init()
const a = ctx.newTensor1D('f32', 1)
const b = ctx.newTensor1D('f32', 1)
const ab = F.mul(a, b)

// Build the computation graph
const graph = ctx.buildForward(ab)

// Set values & compute the graph
a.set(0, 1.5)
b.set(0, 2)
graph.compute()

// Get result
console.log(ab.get(0))

using node.js 20.0.2, tried node 18 too. I am on mac OS 13.4

@cztomsik
Copy link
Owner

It's not published yet on npm but if you build it locally then this is already resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants