Coder Social home page Coder Social logo

coremlinspect's Introduction

CoreMLInspect ๐Ÿ”

Inspect a CoreML model. For each layer see:

  • which device (CPU/GPU/ANE) it can and will run on
  • an estimate of the total cost compared to the whole model

Thin wrapper around the iOS 17.4/macOS 14.4 MLComputePlan API.

$ xcrun coremlcompiler compile path_to_your_model.mlpackage .
$ swift run CoreMLInspect --model-path path_to_your_model.mlmodelc
Analyzing model for compute unit [all]...

Key: C=CPU, G=GPU, N=NeuralEngine
<Estimate of total operation cost>% <primary compute|supported compute> <operation>
func main(input_ids) {
           x_1_axis_0 = const()
           x_1_batch_dims_0 = const()
           transformer_wte_weight_to_fp16 = const()
0.68% G|C  x_1_cast_fp16 = ios16.gather(batch_dims: ["x_1_batch_dims_0"], x: ["transformer_wte_weight_to_fp16"], indices: ["input_ids"], axis: ["x_1_axis_0"])
           var_136 = const()
           var_137 = const()
0.17% G|CN var_145_cast_fp16 = ios16.mul(x: ["x_1_cast_fp16"], y: ["x_1_cast_fp16"])

coremlinspect's People

Contributors

smpanaro avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.