Closed prabathbr closed 1 year ago
Hi @prabathbr , thanks for the PR. Two things:
I approved the workflow and rebased on top of master.
Merging #100 (f5a417a) into master (b1252d9) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #100 +/- ##
=======================================
Coverage 53.58% 53.58%
=======================================
Files 90 90
Lines 12893 12893
=======================================
Hits 6909 6909
Misses 5984 5984
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
If anybody can verify this change works on their machine, I'm happy to merge this in. (I'm just worried that this change introduces other bugs, because we're not currently testing the gpu-code in our CI, as far as I can tell).
If anybody can verify this change works on their machine, I'm happy to merge this in. (I'm just worried that this change introduces other bugs, because we're not currently testing the gpu-code in our CI, as far as I can tell).
Hi, I was able to compile the library successfully after this modification and it generated "_cext_gpu.lib" under the build folder. I tested it using "explainer = shap.explainers.GPUTree(model, X)" with "shap.datasets.adult()" dataset with a RTX3090.
As mentioned in https://github.com/dsgibbons/shap/issues/2 ; I am raising this PR
NVCC compilation in Windows with Visual Studio 2022 is not working with current
setup.py
file and compilation fails with below error. Therefore, GPU bases models likeshap.explainers.GPUTree
can't be used without CUDA support.Error during compilation:
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.5\include\crt/host_config.h(160): fatal error C1189: #error: -- unsupported Microsoft Visual Studio version! Only the versions between 2017 and 2019 (inclusive) are supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
This pull request has modified NVCC command by adding
-allow-unsupported-compiler
to override limitation up to Visual Studio 2019.nvcc_command = "-allow-unsupported-compiler shap/cext/_cext_gpu.cu -lib -o {} -Xcompiler {} -I{} " \