class_docstr: A class for tutel test cases.
class_docstr_tok: ["A","class","for","tutel","test","cases","."]
docstr: Test whether AllToAll-FFN overlapping works properly. Note that too small batch size might cause precision issue.
docstr_tok: ["Test","whether","AllToAll-FFN","overlapping","works","properly",".","Note","that","too","small","batch","size","might","cause","precision","issue","."]
code: def test_a2a_ffn_overlap(self):
      """Test whether AllToAll-FFN overlapping works properly. Note that too small batch size might cause precision issue."""
      self.assertEqual(
          self.tutelCaller.run(
              nproc_per_node=2,
              helloworld_file="helloworld",
              top=2,
              dtype="float64",
              num_local_experts=-2,
              show_step_time=False,
              batch_size=1,
              a2a_ffn_overlap_degree=1,
          ),
          self.tutelCaller.run(
              nproc_per_node=2,
              helloworld_file="helloworld",
              top=2,
              dtype="float64",
              num_local_experts=-2,
              show_step_time=False,
              batch_size=1,
              a2a_ffn_overlap_degree=2,
          ),
      )
  
      self.assertEqual(
          self.tutelCaller.run(
              nproc_per_node=2,
              helloworld_file="helloworld",
              top=2,
              dtype="float64",
              num_local_experts=1,
              show_step_time=False,
              batch_size=1,
              a2a_ffn_overlap_degree=1,
          ),
          self.tutelCaller.run(
              nproc_per_node=2,
              helloworld_file="helloworld",
              top=2,
              dtype="float64",
              num_local_experts=1,
              show_step_time=False,
              batch_size=1,
              a2a_ffn_overlap_degree=2,
          ),
      )
  
      self.assertEqual(
          self.tutelCaller.run(
              nproc_per_node=2,
              helloworld_file="helloworld",
              top=2,
              dtype="float64",
              num_local_experts=2,
              show_step_time=False,
              batch_size=1,
              a2a_ffn_overlap_degree=1,
          ),
          self.tutelCaller.run(
              nproc_per_node=2,
              helloworld_file="helloworld",
              top=2,
              dtype="float64",
              num_local_experts=2,
              show_step_time=False,
              batch_size=1,
              a2a_ffn_overlap_degree=2,
          ),
      )
  
imports: import contextlib
  import io
  import itertools
  import json
  import math
  import os
  import subprocess
  import unittest
  from unittest.mock import patch
label_desc: Use image node_id 13 for calling the TutelTestCase obj's underlying member method code with example usage: obj.test_a2a_ffn_overlap() without return types