code: def softmax_unittest_template(dtypeInput):
      # This is basic test for GpuSoftmax.
      #
      # We check that we loop when their is too much block
      # We use slower code when there isn't enough shared memory
  
      x = T.matrix("x", dtype=dtypeInput)
  
      z = T.nnet.softmax(x)
      f = theano.function([x], z, mode=mode_without_gpu)
      f_gpu = theano.function([x], z, mode=mode_wo_cudnn)
      assert f.maker.fgraph.toposort()[-1].op == T.nnet.softmax_op
      assert isinstance(
          f_gpu.maker.fgraph.toposort()[-2].op, GpuSoftmax
      )
  
      def cmp(n, m):
          data = np.random.uniform(0, 1, (n, m)).astype(
              dtype=dtypeInput
          )
  
          out = f(data)
          gout = f_gpu(data)
          utt.assert_allclose(out, gout)
  
      # we need to test n>32*1024 to check that we make the block loop.
      cmp(2, 5)
      cmp(2 << 15, 5)
      cmp(4074, 400)
      cmp(784, 784)
      cmp(4, 1000)
      cmp(4, 1024)
      cmp(4, 2000)
      cmp(4, 2024)
      # The GTX285 don't have enough shared memory.
      cmp(4, 4074)
      # The GTX580, 680 and kepler don't have enough shared memory.
      cmp(2, 10000)
      cmp(128, 16 * 1024)
      cmp(128, 64 * 1024)
  
imports: from __future__ import absolute_import, print_function, division
  import numpy
  import unittest
  import theano
  import theano.tensor
  import theano.tests.unittest_tools
  from .config import mode_with_gpu, mode_without_gpu
  from ..nnet import GpuCrossentropySoftmaxArgmax1HotWithBias, GpuCrossentropySoftmax1HotWithBiasDx, GpuSoftmaxWithBias, GpuSoftmax
label_desc: Use image node_id 10 for calling a global function with example usage: softmax_unittest_template(dtypeInput) without return types