tensorflow
tensorflow copied to clipboard
Unresolved symbol: _Z13get_global_idj on Intel GPU
Hello,
I am trying to follow your tutorial to build tensorflow with in branch dev/intel_gpu. Then I run one minimal testcases in tensorflow and it shows the following errors. Could you give me some suggestions how to run with Intel GPUs?
Unresolved symbol: _Z13get_global_idj
Aborting...
After some search, I find that this issue are similar to # https://github.com/codeplaysoftware/computecpp-sdk/issues/19
And the following is my opencl information.
Number of platforms: 1
Platform Profile: FULL_PROFILE
Platform Version: OpenCL 1.2 beignet 1.2 (git-097365e)
Platform Name: Intel Gen OCL Driver
Platform Vendor: Intel
Platform Extensions: cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_3d_image_writes cl_khr_image2d_from_buffer cl_khr_spir cl_khr_icd cl_intel_accelerator cl_intel_subgroups
Platform Name: Intel Gen OCL Driver
Number of devices: 1
Device Type: CL_DEVICE_TYPE_GPU
Device ID: 32902
Max compute units: 72
Max work items dimensions: 3
Max work items[0]: 512
Max work items[1]: 512
Max work items[2]: 512
Max work group size: 512
Preferred vector width char: 16
Preferred vector width short: 8
Preferred vector width int: 4
Preferred vector width long: 2
Preferred vector width float: 4
Preferred vector width double: 0
Native vector width char: 8
Native vector width short: 8
Native vector width int: 4
Native vector width long: 2
Native vector width float: 4
Native vector width double: 2
Max clock frequency: 1000Mhz
Address bits: 32
Max memory allocation: 3221225472
Image support: Yes
Max number of images read arguments: 128
Max number of images write arguments: 8
Max image 2D width: 8192
Max image 2D height: 8192
Max image 3D width: 8192
Max image 3D height: 8192
Max image 3D depth: 2048
Max samplers within kernel: 16
Max size of kernel argument: 1024
Alignment (bits) of base address: 1024
Minimum alignment (bytes) for any datatype: 128
Single precision floating point capability
Denorms: No
Quiet NaNs: Yes
Round to nearest even: Yes
Round to zero: No
Round to +ve and infinity: No
IEEE754-2008 fused multiply-add: No
Cache type: Read/Write
Cache line size: 64
Cache size: 8192
Global memory size: 4294967296
Constant buffer size: 134217728
Max number of constant args: 8
Local memory type: Global
Local memory size: 65536
Error correction support: 0
Unified memory for Host and Device: 1
Profiling timer resolution: 80
Device endianess: Little
Available: Yes
Compiler available: Yes
Execution capabilities:
Execute OpenCL kernels: Yes
Execute native function: Yes
Queue properties:
Out-of-Order: No
Profiling : Yes
Platform ID: 0x7f234d9b4bc0
Name: Intel(R) HD Graphics Skylake Server GT4
Vendor: Intel
Device OpenCL C version: OpenCL C 1.2 beignet 1.2 (git-097365e)
Driver version: 1.2
Profile: FULL_PROFILE
Version: OpenCL 1.2 beignet 1.2 (git-097365e)
Extensions: cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_3d_image_writes cl_khr_image2d_from_buffer cl_khr_spir cl_khr_icd cl_intel_accelerator cl_intel_subgroups cl_khr_fp16
And the following is computecpp_info information.
ComputeCpp Info (CE 0.2.1)
********************************************************************************
Toolchain information:
GLIBC version: 2.19
GLIBCXX: 20150426
This version of libstdc++ is supported.
********************************************************************************
Device Info:
Discovered 1 devices matching:
platform : <any>
device type : <any>
--------------------------------------------------------------------------------
Device 0:
Device is supported : UNTESTED - Device not tested on this OS
CL_DEVICE_NAME : Intel(R) HD Graphics Skylake Server GT4
CL_DEVICE_VENDOR : Intel
CL_DRIVER_VERSION : 1.2
CL_DEVICE_TYPE : CL_DEVICE_TYPE_GPU
If you encounter problems when using any of these OpenCL devices, please consult
this website for known issues:
https://computecpp.codeplay.com/releases/v0.2.1/platform-support-notes
Thanks.
Hi @Darwin2011 ,
Could you try adding -m32 flag as mentioned https://github.com/codeplaysoftware/computecpp-sdk/issues/19#issuecomment-282273724 to https://github.com/lukeiwanski/tensorflow/blob/master/third_party/sycl/crosstool/computecpp.tpl#L76?
We want to have a better way of dealing with device and host pointer missmatch.
Did that help?
Sorry for the late reply. I have tried to build tensorflow with 32bits toolchain but until now I still cannot make it work.
Hi @Darwin2011, what sort of errors are you getting when using -m32? This should instruct compute++ to compile for a 32-bit architecture, though you will need the corresponding 32-bit header files for the program to compile correctly. It's possible that if you don't have them installed, the compilation will fail and the program will not work. If it's compiling correctly and is failing at runtime, I'll take another look and might be able to suggest some more possible fixes.
@Darwin2011 is this still the case?
Well, since this issue is quite old, things have changed rather dramatically - we can offer you updated instructions if you'd like them.
Is there a step by step tutorial to build tensorflow to work for skylake GT2? I am eager to try that out on my computer. For example, which branch should I use? Are there other dependencies? Which bazel option should I use?
Hi @smilesun, you should use the branch dev/amd_gpu for your hardware with the most recent ComputeCpp release (v0.8.0). The instructions here will tell you how to build the branch (you can ignore the bits about AMD drivers, assuming yours are correctly set up already).