code: def test_large_models():
      device = default_device()
      # Create model
      net = gluon.nn.HybridSequential()
  
      largest_num_features = 256
      net.add(nn.Conv2D(largest_num_features, 3))
  
      net.hybridize()
      net.initialize(mx.init.Normal(sigma=0.01), device=device)
  
      # Compute the height (=width) of the square tensor of the given size in bytes
      def tensor_size(big_tensor_bytes):
          bytes_per_float = 4
          sz = int(
              math.sqrt(
                  big_tensor_bytes
                  / largest_num_features
                  / bytes_per_float
              )
          )
          return (sz // 100) * 100
  
      # The idea is to create models with large tensors of (say) 20% of the total memory.
      # This in the past has given cudnnFind() trouble when it needed to allocate similar I/O's
      # from the area carved out by the MXNET_GPU_MEM_POOL_RESERVE setting (by default 5%).
      (free_mem_bytes, total_mem_bytes) = mx.device.gpu_memory_info(
          device.device_id
      )
      # This test needs to be 'qualified' for use with each new larger memory size
      largest_supported_total_mem_GB = 32
      if (
          total_mem_bytes
          > largest_supported_total_mem_GB * 1024 * 1024 * 1024
      ):
          sys.stderr.write(
              " bypassing test due to too-large global memory of size {} ... ".format(
                  total_mem_bytes
              )
          )
          return
  
      start_size = tensor_size(0.20 * total_mem_bytes)
      num_trials = 10
      sys.stderr.write(
          " testing global memory of size {} ... ".format(
              total_mem_bytes
          )
      )
      sys.stderr.flush()
      for i in range(num_trials):
          sz = start_size - 10 * i
          (height, width) = (sz, sz)
          sys.stderr.write(" {}x{} ".format(height, width))
          sys.stderr.flush()
          data_in = mx.np.random.uniform(
              low=0,
              high=255,
              size=(1, 3, height, width),
              device=device,
              dtype="float32",
          )
          # Evaluate model
          net(data_in).asnumpy()
  
imports: import sys
  import os
  import time
  import random
  import mxnet
  import multiprocessing
  from mxnet.test_utils import check_consistency, set_default_device, assert_almost_equal, rand_ndarray, environment
  import numpy
  import math
  from mxnet import autograd
  import pytest
  from common import assert_raises_cudnn_not_satisfied, run_in_spawned_process, random_seed
  from test_gluon import *
  from test_loss import *
  from test_numpy_loss import *
  from test_gluon_rnn import *
label_desc: Use image node_id 17 for calling a global function with example usage: test_large_models() and returns: unknown