Open shangerxin opened 1 year ago
This specific issue is caused by OpRegistrationData
type being defined as struct OpRegistrationData but declared in failing translation unit as class OpRegistrationData.
Clang apparently makes the difference here (unlike msvc) and it can't find the symbol with class
attribute while it is defined only as struct
.
Changing class OpRegistrationData to struct OpRegistrationData
fixes this spcific issue, and build passes further, but then fails on linking _pywrap_internal
.dll on bfloat16.so symbols duplicate issue. Trying to fix that now.
OK. I will pull the latest code and verified on my end too.
Click to expand!
### Issue Type Bug ### Have you reproduced the bug with TF nightly? Yes ### Source source ### Tensorflow Version tf 2.12 ### Custom Code No ### OS Platform and Distribution Microsoft Windows Server 2019 Datacenter ### Mobile device _No response_ ### Python version Python 3.10 ### Bazel version 5.3.0 ### GCC/Compiler version _No response_ ### CUDA/cuDNN version _No response_ ### GPU model and memory _No response_ ### Current Behaviour? #### Background We have switch the TensorFlow compilation from MSVC to clang-cl and resolved two compile errors. The compilation is complete but there is a link issue before we can complete package TensorFlow to wheel. #### How to reproduce 1. Fix the const expression error a. Add file to third_party\tf_runtime_clangcl.patch with content ```shell diff --git a/include/tfrt/support/std_mutex.h b/include/tfrt/support/std_mutex.h index 6238d097..9fb24279 100644 --- a/include/tfrt/support/std_mutex.h +++ b/include/tfrt/support/std_mutex.h @@ -50,7 +50,7 @@ class TFRT_CAPABILITY("mutex") mutex { private: friend class mutex_lock; - std::mutex mu_; + std::mutex mu_{}; }; // Wrap std::unique_lock