Closed suizman closed 2 years ago
Hi @suizman Thank you for creating this issue! :)
This error indicates that your application crashed when trying to load libbigquant_avx512.dylib
. Seems there is something wrong with our jar (This file should be packaged into our jar, and loaded during runtime). I will try to reproduce this error. Can you share more details about your workload/example, bigdl model/version and Spark configurations? It is not recommended to use bigquant in current stage.
No. It is complied for macOS (dylib
is for macOS only. But it crashed during loading). We can use AVX-512 feature on both Linux and MacOS if CPU has this feature. Your CPU has AVX-512 ( https://www.intel.com/content/www/us/en/products/sku/196593/intel-core-i71068ng7-processor-8m-cache-up-to-4-10-ghz/specifications.html), so it should work for you.
Yes. By default BigDL will try to enable AVX-512 support with mklblas (by default) and mkldnn (called oneDNN now. Need flag to enable) .These 2 libs are different but both have AVX-512 support. If you want to enable mkldnn, just add this java conf -Dbigdl.engineType=mkldnn -Dbigdl.mklNumThreads=8
.
Last but not least, we are merging this repo (Analytics-Zoo) to BigDL (2.0 branch). After we find the root cause, we encourage you to migrate to BigDL 2.0. :)
Do you call any quantize()
method in your application?
libbigquant_avx512.dylib
can not be found is fixed by https://github.com/intel-analytics/BigDL-core/pull/140 .
Hi @qiyuangong, thanks for your response.
These are my actual versions with Scala 2.11.12: analytics-zoo-bigdl_0.12.2-spark_2.4.3 -> 0.10.0 zoo-core-mkl-mac -> 0.10.0 spark-mllib -> 2.4.3 spark-sql -> 2.4.3
Which version of BigDL I should use? Should I compile this intel-analytics/BigDL-core#140 last version with the fix?
Yes @qiuxin2012, I'm using the quantize() method
Thanks
Hi @qiyuangong, thanks for your response.
These are my actual versions with Scala 2.11.12: analytics-zoo-bigdl_0.12.2-spark_2.4.3 -> 0.10.0 zoo-core-mkl-mac -> 0.10.0 spark-mllib -> 2.4.3 spark-sql -> 2.4.3
Which version of BigDL I should use? Should I compile this intel-analytics/BigDL-core#140 last version with the fix?
Yes @qiuxin2012, I'm using the quantize() method
Thanks
Known Solution for this issue:
Have a nice day! Qiyuan
Hi @suizman
We have updated latest jar&version for Analytics-Zoo and BigDL 2.0.
You can build from source with latest
Analytics-Zoo(master): bash zoo/make-dist.sh
BigDL (Branch-2.0): bash scala/make-dist.sh
Will update download link for jars later Analytics-Zoo (https://oss.sonatype.org/content/repositories/snapshots/com/intel/analytics/zoo/analytics-zoo-bigdl_0.14.0-SNAPSHOT-spark_2.4.6/) BigDL 2.0 (https://oss.sonatype.org/content/repositories/snapshots/com/intel/analytics/bigdl/dist-spark-2.4.6-scala-2.11.8-all/0.13.1-SNAPSHOT/)
Have a nice day! Qiyuan
Many thanks @qiyuangong, I'll try with that versions
Hi @qiyuangong
Now I'm getting the following error:
Exception in thread "main" java.lang.Error: Can't find the library libjdnn.dylib in the resource folder.
at com.intel.analytics.bigdl.mkl.Loader.resource(Loader.java:89)
at com.intel.analytics.bigdl.mkl.Loader.copyAll(Loader.java:80)
at com.intel.analytics.bigdl.mkl.Loader.init(Loader.java:52)
at com.intel.analytics.bigdl.mkl.MklDnn.<clinit>(MklDnn.java:27)
at com.intel.analytics.bigdl.mkl.hardware.Affinity.<clinit>(Affinity.java:16)
at com.intel.analytics.bigdl.utils.Engine$.setMklDnnEnvironments(Engine.scala:604)
at com.intel.analytics.bigdl.utils.Engine$.<init>(Engine.scala:55)
at com.intel.analytics.bigdl.utils.Engine$.<clinit>(Engine.scala)
at com.intel.analytics.bigdl.nn.abstractnn.AbstractModule.<init>(AbstractModule.scala:1045)
at com.intel.analytics.bigdl.nn.Container.<init>(Container.scala:42)
at com.intel.analytics.bigdl.nn.keras.KerasLayer.<init>(KerasLayer.scala:168)
at com.intel.analytics.bigdl.nn.keras.SoftMax.<init>(SoftMax.scala:32)
at com.intel.analytics.bigdl.nn.keras.SoftMax$.apply$mFc$sp(SoftMax.scala:68)
at SoftMaxTest$.<init>(SoftMaxTest.scala:17)
at SoftMaxTest$.<clinit>(SoftMaxTest.scala)
at Main$.main(Main.scala:11)
at Main.main(Main.scala)
It seams that this library is also missing in the latest nightly.
Hi @suizman
Unfortunately, according to https://github.com/intel-analytics/analytics-zoo-internal/issues/875 libjdnn
is not supported on macOS. Please avoid using mkldnn
and quantize
on macOS.
We added a warning for this issue (https://github.com/intel-analytics/BigDL/pull/3649).
Ok, thanks. We can close this issue.
Thank you @suizman ! Issue closed. 👍
Have a nice day! Qiyuan
I'm trying to run an inference using BigDL and I'm getting the following error:
Issue:
System specs:
CPU: Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz OS: MacOS Big Sur 11.6.1
It seams that library is trying to use avx512 library but it isn't compiled for MacOS, only for Linux? Is there a chance to use mkldnn/avx512 on MacOS or force mklblass using some special flag before executing the process? I've tried -Dbigdl.engineType=mklblas but it does not work..
Thanks