title: Check that `name_expressions` is iterable
body: <p>When trying out the new <code>jitify</code> support planned for CuPy v9.x, I found that the <code>name_expressions</code> named argument to <code>cupy.RawModule</code> needs to be iterable for the NVRTC to not fail when later calling <code>get_function</code>. Question stemming out of <a href="https://stackoverflow.com/questions/64442514/cupy-rawmodule-using-name-expressions-and-nvcc-and-or-path">cupy.RawModule using name_expressions and nvcc and/or path</a>.</p>
  <pre class="lang-py prettyprint-override"><code>def mykernel():
      grid = (...)
      blocks = (...)
      args = (...)
  
      with open('my_cuda_cpp_code.cu') as f:
          code = f.read()
  
      kers = ('nameofkernel')
      mod = cp.RawModule(code=code, jitify=True, name_expressions=kers, ...)
      mod.get_function('nameofkernel')(grid, block, args)
  </code></pre>
  <p>The code above produces the following error output:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;/home/mikaeltw/env/lib/python3.8/site-packages/cupy/cuda/compiler.py&quot;, line 586, in compile
      nvrtc.compileProgram(self.ptr, options)
    File &quot;cupy_backends/cuda/libs/nvrtc.pyx&quot;, line 108, in cupy_backends.cuda.libs.nvrtc.compileProgram
    File &quot;cupy_backends/cuda/libs/nvrtc.pyx&quot;, line 120, in cupy_backends.cuda.libs.nvrtc.compileProgram
    File &quot;cupy_backends/cuda/libs/nvrtc.pyx&quot;, line 58, in cupy_backends.cuda.libs.nvrtc.check_status
  cupy_backends.cuda.libs.nvrtc.NVRTCError: NVRTC_ERROR_COMPILATION (6)
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File &quot;./jitify_test.py&quot;, line 62, in &lt;module&gt;
      test_mykernel()
    File &quot;./jitify_test.py&quot;, line 57, in test_mykernel
      mykernel(x_out, x_in)
    File &quot;./jitify_test.py&quot;, line 50, in mykernel
      mod.get_function('nameofkernel')(grid, block, args)
    File &quot;cupy/core/raw.pyx&quot;, line 470, in cupy.core.raw.RawModule.get_function
    File &quot;cupy/core/raw.pyx&quot;, line 394, in cupy.core.raw.RawModule.module.__get__
    File &quot;cupy/core/raw.pyx&quot;, line 402, in cupy.core.raw.RawModule._module
    File &quot;cupy/_util.pyx&quot;, line 53, in cupy._util.memoize.decorator.ret
    File &quot;cupy/core/raw.pyx&quot;, line 547, in cupy.core.raw._get_raw_module
    File &quot;cupy/core/core.pyx&quot;, line 1829, in cupy.core.core.compile_with_cache
    File &quot;cupy/core/core.pyx&quot;, line 1883, in cupy.core.core.compile_with_cache
    File &quot;/home/mikaeltw/env/lib/python3.8/site-packages/cupy/cuda/compiler.py&quot;, line 393, in compile_with_cache
      return _compile_with_cache_cuda(
    File &quot;/home/mikaeltw/env/lib/python3.8/site-packages/cupy/cuda/compiler.py&quot;, line 472, in _compile_with_cache_cuda
      ptx, mapping = compile_using_nvrtc(
    File &quot;/home/mikaeltw/env/lib/python3.8/site-packages/cupy/cuda/compiler.py&quot;, line 229, in compile_using_nvrtc
      return _compile(source, options, cu_path,
    File &quot;/home/mikaeltw/env/lib/python3.8/site-packages/cupy/cuda/compiler.py&quot;, line 213, in _compile
      ptx, mapping = prog.compile(options, log_stream)
    File &quot;/home/mikaeltw/env/lib/python3.8/site-packages/cupy/cuda/compiler.py&quot;, line 597, in compile
      raise CompileException(log, self.src, self.name, options,
  cupy.cuda.compiler.CompileException: __nv_name_map(2): error: expected an expression
  
  __nv_name_map(2): error: Error in parsing name expression for lowered name lookup. Input name expression was: &quot; :&quot;
  __nv_name_map(3): error: identifier &quot;_&quot; is undefined
  --||--
  </code></pre>
  <p>Setting <code>kers</code> to an iterable, e.g. <code>['nameofkernel']</code> or <code>('nameofkernel',)</code> and it works.</p>
  <p>According to the docs <a href="https://docs.cupy.dev/en/stable/reference/generated/cupy.RawModule.html" rel="nofollow noreferrer">https://docs.cupy.dev/en/stable/reference/generated/cupy.RawModule.html</a>, the <code>name_expressions</code> should be given as a sequence of strings. My suggestion is to check that <code>name_expressions</code> is iterable (not just a single str, even though str is iterable), to catch an otherwise cryptic error when calling <code>get_function</code>.</p>