fix: sanitize problematic LD_PRELOAD for cuDNN
This commit is contained in:
@@ -214,6 +214,25 @@ class TrainVLATransformerOptimizerTest(unittest.TestCase):
|
||||
for group in optimizer.param_groups
|
||||
]
|
||||
|
||||
def test_clean_ld_preload_value_removes_problematic_nxegl_entry(self):
|
||||
module = self._load_train_vla_module()
|
||||
|
||||
cleaned, changed = module._clean_ld_preload_value(
|
||||
'/usr/lib/libfoo.so /usr/NX/lib/libnxegl.so /usr/lib/libbar.so'
|
||||
)
|
||||
|
||||
self.assertTrue(changed)
|
||||
self.assertEqual(cleaned, '/usr/lib/libfoo.so /usr/lib/libbar.so')
|
||||
|
||||
def test_clean_ld_preload_value_leaves_safe_entries_unchanged(self):
|
||||
module = self._load_train_vla_module()
|
||||
|
||||
cleaned, changed = module._clean_ld_preload_value('/usr/lib/libfoo.so /usr/lib/libbar.so')
|
||||
|
||||
self.assertFalse(changed)
|
||||
self.assertEqual(cleaned, '/usr/lib/libfoo.so /usr/lib/libbar.so')
|
||||
|
||||
|
||||
def test_configure_cuda_runtime_can_disable_cudnn_for_training(self):
|
||||
module = self._load_train_vla_module()
|
||||
cfg = AttrDict(train=AttrDict(device='cuda', disable_cudnn=True))
|
||||
|
||||
Reference in New Issue
Block a user