[FlagGems] fix the error like: 1. AttributeError: 'dict' object has no attribute 'total_memory' (test_pointwise_dynamic.py) 2. AttributeError: module 'torch.cpu' has no attribute 'get_device_capability' (test_pointwise_dynamic.py) 3. AssertionError: Torch not compiled with CUDA enabled (test_quant.py) 4. TypeError: unsupported operand type(s) for //: 'int' and 'NoneType' (test_general_reduction_ops.py)