Run this model with HF Jobs

Run OpenPeerAI/FastPrint on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/OpenPeerAI/FastPrint. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/OpenPeerAI/FastPrint on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
FastPrint / Slicing /SliceAccelerator.cs
Mentors4EDU's picture
Upload 6 files
b6a0fc3 verified
Raw History Blame Contribute Delete
924 Bytes
using ILGPU;
using ILGPU.Runtime;
using System;
namespace FastPrint.Slicing
{
public class SliceAccelerator : IDisposable
{
private Context context;
private Accelerator accelerator;
public SliceAccelerator()
{
context = Context.CreateDefault();
accelerator = context.GetPreferredDevice(preferCPU: false).CreateAccelerator(context);
}
// Example kernel for slicing
public void Slice(float[] vertices, float layerHeight, Action<float[]> onSliced)
{
using var buffer = accelerator.Allocate1D(vertices);
accelerator.Synchronize();
// Placeholder: actual slicing logic should be implemented here
onSliced(vertices);
}
public void Dispose()
{
accelerator.Dispose();
context.Dispose();
}
}
}