Giter VIP home page Giter VIP logo

Comments (7)

levyfan avatar levyfan commented on August 27, 2024

Half precision is not supported by CPU. MKL does not have such half precision BLAS methods.

from cubert.

wolfshow avatar wolfshow commented on August 27, 2024

Half precision is not supported by CPU. MKL does not have such half precision BLAS methods.

how to modify the code to be used with CPU?

from cubert.

levyfan avatar levyfan commented on August 27, 2024

Half precision is not supported by CPU. MKL does not have such half precision BLAS methods.

how to modify the code to be used with CPU?

Could you clarify your question? I am not sure what you are asking.

For running on CPU, only single precision (float) is supported. The reason of no half precision is lying on Intel's MKL. They do not support half precision computing. There is nothing we can do now.

from cubert.

wolfshow avatar wolfshow commented on August 27, 2024

For running on CPU, only single precision (float) is supported. The reason of no half precision is lying on Intel's MKL. They do not support half precision computing. There is nothing we can do now.

When I compile the current code base and run the ”cuBERT_benchmark“, I got the error "half precision not supported by CPU". My question is, how to modify the code and make it runnable on CPU? I only need single precision computing.

from cubert.

levyfan avatar levyfan commented on August 27, 2024

You can simply change

typedef half_float::half Dtype;

to typedef float Dtype;

and change

cuBERT_ComputeType compute_type = cuBERT_COMPUTE_HALF;

to cuBERT_ComputeType compute_type = cuBERT_COMPUTE_FLOAT;

from cubert.

levyfan avatar levyfan commented on August 27, 2024

If you would like to run your own model, you may also need to give

Dtype logits[batch_size];

more memory space and change output_type from cuBERT_LOGITS to your own model.

from cubert.

wolfshow avatar wolfshow commented on August 27, 2024

If you would like to run your own model, you may also need to give

cuBERT/benchmark/benchmark_cu.cpp

Line 39 in 8ab0384

Dtype logits[batch_size];

more memory space and change output_type from cuBERT_LOGITS to your own model.

Thanks a lot!

from cubert.

Related Issues (20)

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.