Comments (7)
Half precision is not supported by CPU. MKL does not have such half precision BLAS methods.
from cubert.
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.
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.
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.
You can simply change
cuBERT/benchmark/benchmark_cu.cpp
Line 8 in 8ab0384
to
typedef float Dtype;
and change
cuBERT/benchmark/benchmark_cu.cpp
Line 11 in 8ab0384
to
cuBERT_ComputeType compute_type = cuBERT_COMPUTE_FLOAT;
from cubert.
If you would like to run your own model, you may also need to give
cuBERT/benchmark/benchmark_cu.cpp
Line 39 in 8ab0384
more memory space and change
output_type
from cuBERT_LOGITS to your own model.from cubert.
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)
- java中测试mklBert计算时间很高 HOT 2
- 弱问怎么得到自己的bert_frozen_seq32.pb? HOT 4
- undefined reference to `cublasGemmStridedBatchedEx' HOT 3
- out of memory when seq_length=384 and batch_size=1 HOT 2
- build from source的时候遇到点问题 HOT 10
- 愿意来线下参加个分享吗?
- further accelerate CPU gemm by mkl compact blas
- CuBERT not utilizing all threads with multi-cpu HOT 4
- could you provide the demo of how can generate input_ids input_mask、segment_ids by c++
- 序列化任务, 跟官方bert运行结果不一致
- transformer output nan in last few layer HOT 1
- 请问编译出来的libcuBert.so该如何使用?
- infinite loop when handling bad utf8 string
- 在进行build时执行cmake -DCMAKE_BUILD_TYPE=Release -DcuBERT_ENABLE_MKL_SUPPORT=ON .. make -j4,报错 HOT 3
- 在cpu上的cubert推理速度比tf_bert慢 HOT 1
- 关于test中模型的其他输出 HOT 1
- what(): Unable to open vocab file
- Java api run slowerly than Python HOT 1
- 运行训练问题 HOT 2
- 代码更改问题咨询
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cubert.