使用c++filt
命令。当我通过 c++filt 传递您的示例内核名称时,我得到
void thrust::system::cuda::detail::detail::launch_closure_by_value<thrust::system::cuda::detail::for_each_n_detail::for_each_n_closure<thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptr<int> >, thrust::detail::normal_iterator<thrust::device_ptr<int> >, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type> >, unsigned int, thrust::detail::device_unary_transform_functor<my_functor>, thrust::system::cuda::detail::detail::blocked_thread_array> >(thrust::system::cuda::detail::for_each_n_detail::for_each_n_closure<thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptr<int> >, thrust::detail::normal_iterator<thrust::device_ptr<int> >, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type> >, unsigned int, thrust::detail::device_unary_transform_functor<my_functor>, thrust::system::cuda::detail::detail::blocked_thread_array>)
void thrust::system::cuda::detail::detail::launch_closure_by_value<thrust::system::cuda::detail::for_each_n_detail::for_each_n_closure<thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptr<int> >, thrust::detail::normal_iterator<thrust::device_ptr<int> >, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type> >, long, thrust::detail::device_unary_transform_functor<my_functor>, thrust::system::cuda::detail::detail::blocked_thread_array> >(thrust::system::cuda::detail::for_each_n_detail::for_each_n_closure<thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptr<int> >, thrust::detail::normal_iterator<thrust::device_ptr<int> >, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type> >, long, thrust::detail::device_unary_transform_functor<my_functor>, thrust::system::cuda::detail::detail::blocked_thread_array>)
thrust::detail::device_function<thrust::detail::device_unary_transform_functor<my_functor>, void>::device_function(thrust::detail::device_unary_transform_functor<my_functor> const&)
命令:
cuobjdump file.cu.o --dump-elf-symbols | grep STB_GLOBAL | tr -s " " | cut -d" " -f4,4 | c++filt