Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARROW-17421: [C++] CUDA on Windows fails to build #13883

Merged
merged 2 commits into from
Aug 15, 2022

Conversation

assignUser
Copy link
Member

No description provided.

@assignUser
Copy link
Member Author

assignUser commented Aug 15, 2022

@pitrou This built on my win 10 machine for vcpkg (microsoft/vcpkg#26187) but I am unsure if it has any negative implications. Please have a look.

@pitrou
Copy link
Member

pitrou commented Aug 15, 2022

@assignUser Did you also run the tests?

@assignUser
Copy link
Member Author

assignUser commented Aug 15, 2022

No I just ran vcpkg install arrow[cuda]:x64-windows-static. I'll setup a proper C++ env to run them.

@pitrou
Copy link
Member

pitrou commented Aug 15, 2022

In any case, the fix looks fine (assuming it compiles and tests).

@github-actions
Copy link

@github-actions
Copy link

⚠️ Ticket has not been started in JIRA, please click 'Start Progress'.

@assignUser
Copy link
Member Author

@pitrou The cuda tests didn't build, it doesn't sound related though?

  Building Custom Rule C:/repos/17421-cuda-windows/cpp/src/arrow/gpu/CMakeLists.txt
  cuda_test.cc
cuda_test.obj : error LNK2019: unresolved external symbol "class arrow::Result<unsigned char *> __cdecl arrow::cuda::G
etHostAddress(unsigned __int64)" (?GetHostAddress@cuda@arrow@@YA?AV?$Result@PEAE@2@_K@Z) referenced in function "priva
te: virtual void __cdecl arrow::cuda::TestCudaHostBuffer_AllocateGlobal_Test::TestBody(void)" (?TestBody@TestCudaHostB 
uffer_AllocateGlobal_Test@cuda@arrow@@EEAAXXZ) [C:\repos\17421-cuda-windows\cpp\build\src\arrow\gpu\arrow-cuda-test.vc 
xproj]
cuda_test.obj : error LNK2019: unresolved external symbol "class arrow::Status __cdecl arrow::cuda::internal::StatusFr 
omCuda(enum cudaError_enum,char const *)" (?StatusFromCuda@internal@cuda@arrow@@YA?AVStatus@3@W4cudaError_enum@@PEBD@Z 
) referenced in function "public: virtual void __cdecl arrow::cuda::TestCudaBase::TearDown(void)" (?TearDown@TestCudaB 
ase@cuda@arrow@@UEAAXXZ) [C:\repos\17421-cuda-windows\cpp\build\src\arrow\gpu\arrow-cuda-test.vcxproj]
C:\repos\17421-cuda-windows\cpp\build\release\Release\arrow-cuda-test.exe : fatal error LNK1120: 2 unresolved external 
s [C:\repos\17421-cuda-windows\cpp\build\src\arrow\gpu\arrow-cuda-test.vcxproj]

@pitrou
Copy link
Member

pitrou commented Aug 15, 2022

@assignUser It seems ARROW_EXPORT is missing on a bunch of APIs:

/// Low-level: get a device address through which the CPU data be accessed.
Result<uintptr_t> GetDeviceAddress(const uint8_t* cpu_data,
const std::shared_ptr<CudaContext>& ctx);
/// Low-level: get a CPU address through which the device data be accessed.
Result<uint8_t*> GetHostAddress(uintptr_t device_ptr);

std::string CudaErrorDescription(CUresult err);
Status StatusFromCuda(CUresult res, const char* function_name = nullptr);

@assignUser
Copy link
Member Author

Thanks, that fixed it: [==========] 17 tests from 7 test suites ran. (430 ms total) 🥳

@assignUser assignUser marked this pull request as ready for review August 15, 2022 18:34
Copy link
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, thank you @assignUser

@pitrou
Copy link
Member

pitrou commented Aug 15, 2022

Looks like AppVeyor build failure would be fixed by #13869

@pitrou pitrou merged commit 7ecfcf0 into apache:master Aug 15, 2022
ksuarez1423 pushed a commit to ksuarez1423/arrow that referenced this pull request Aug 15, 2022
Authored-by: Jacob Wujciak-Jens <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
ksuarez1423 pushed a commit to ksuarez1423/arrow that referenced this pull request Aug 15, 2022
Authored-by: Jacob Wujciak-Jens <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
@ursabot
Copy link

ursabot commented Aug 16, 2022

Benchmark runs are scheduled for baseline = 3a59bc0 and contender = 7ecfcf0. 7ecfcf0 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Failed ⬇️0.37% ⬆️0.0%] test-mac-arm
[Failed ⬇️0.0% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.43% ⬆️0.0%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] 7ecfcf03 ec2-t3-xlarge-us-east-2
[Finished] 7ecfcf03 test-mac-arm
[Failed] 7ecfcf03 ursa-i9-9960x
[Finished] 7ecfcf03 ursa-thinkcentre-m75q
[Finished] 3a59bc02 ec2-t3-xlarge-us-east-2
[Failed] 3a59bc02 test-mac-arm
[Failed] 3a59bc02 ursa-i9-9960x
[Finished] 3a59bc02 ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

@ursabot
Copy link

ursabot commented Aug 16, 2022

['Python', 'R'] benchmarks have high level of regressions.
ursa-i9-9960x

@wesm
Copy link
Member

wesm commented Aug 19, 2022

Having to use shared_ptr for the PIMPL is weird, IIRC this is often caused by not having an explicit destructor?

zagto pushed a commit to zagto/arrow that referenced this pull request Oct 7, 2022
Authored-by: Jacob Wujciak-Jens <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants