Skip to content

Conversation

@umar456
Copy link
Member

@umar456 umar456 commented Jul 1, 2020

ArrayFire was failing to build with NVCC's -G(device symbols) flag.

Description

Support compiling of ArrayFire with the -G flag in NVCC. This flag embeds device symbols in the binary
so that you could debug CUDA kernels using cuda-gdb. Compiling with device debug symbols was failing
because we were calling host functions from functions that supported both device and host code.

This PR also addresses an issue where we were using the default stream when calling CUB functions
in reduce by key.

Tests for reduce by keys don't pass in the current master with debug symbols because of the newer
version of CUB used. The older version of CUB passes the tests but it is not compatible with CUDA 11.
This is still being investigated and I have NOT included the fix as part of this PR.

Changes to Users

N/A

Checklist

  • Rebased on latest master
  • Code compiles
  • Tests pass
  • [ ] Functions added to unified API
  • [ ] Functions documented

umar456 added 2 commits June 30, 2020 17:15
* ArrayFire couldn't be compiled using device debug symbols because
  the get_stream and synchronize_stream functions with the
  ThrustArrayFirePolicy needed to be device and host compatible.
  These functions were using some host only functions so they
  couldn't be compiled for the device. Although these functions
  aren't really used, they caused missing symbol errors when passing
  the -G flag.
@umar456 umar456 added the CUDA label Jul 1, 2020
@umar456 umar456 added this to the 3.7.2 milestone Jul 1, 2020
@umar456 umar456 requested a review from syurkevi July 1, 2020 15:36
@umar456 umar456 force-pushed the fix_thrust_policy branch from 953e933 to e2caeb6 Compare July 1, 2020 22:28
@umar456
Copy link
Member Author

umar456 commented Jul 1, 2020

This PR also fixes #2955

syurkevi
syurkevi previously approved these changes Jul 1, 2020
@9prady9
Copy link
Member

9prady9 commented Jul 2, 2020

fyi: opencl reduce failed.

@umar456 umar456 force-pushed the fix_thrust_policy branch from 3a49ea9 to fe42e70 Compare July 2, 2020 19:07
@umar456 umar456 merged commit 930acaa into arrayfire:master Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants