This patch disables the ManagedMemoryRewrite pass if we are not generating CUDA code. The pass was enabled by default when generating GPU code, which resulted in a failed compilation when only OpenCL was present. Additionally it attempted to rewrite alloc() and free() calls even when the command line flag was set to false, because the cli option did not guard the pass correctly.
Using this patch, the ManagedMemoryRewrite pass is only enabled if both the command line option is set and we are generating ptx code.
Is this outside the namespace?