Page MenuHomePhabricator

[CUDA] Allow code generation for functions with target attributes that don't match compilation mode.
AbandonedPublic

Authored by tra on Oct 22 2015, 3:56 PM.

Details

Summary

Currently -fcuda-disable-target-call-checks option enables parsing of code that calls across host/device boundary.
However, we don't emit any IR for functions that don't have attributes appropriate for the current compilation mode, so such cross-calls always fail at runtime due to unresolved references.

The patch allows CodeGen to emit non-matching functions if they are needed to resolve references in the current module.

This feature is enabled by -fcuda-disable-target-call-checks

The patch makes it possible for device side to use host unmodified includes that provide unattributed functions.
For instance, it allows use of larger subset of standard C++ library headers.

Diff Detail

Event Timeline

tra updated this revision to Diff 38181.Oct 22 2015, 3:56 PM
tra retitled this revision from to [CUDA] Allow code generation for functions with target attributes that don't match compilation mode..
tra updated this object.
tra added reviewers: eliben, jingyue, jpienaar, echristo.
tra added a subscriber: cfe-commits.
jingyue edited edge metadata.Mar 15 2016, 10:33 AM

Is this patch obsolete? Are you still trying to push it in?

tra abandoned this revision.Mar 21 2016, 2:36 PM