INNER CODE UNIT · Python
validate_flags
NVIDIA/DeepLearningExamples · PyTorch/Recommendation/DLRM/dlrm/scripts/main.py:146
def validate_flags(cat_feature_count):
if FLAGS.max_table_size is not None and not FLAGS.hash_indices:
raise ValueError('Hash indices must be True when setting a max_table_size')
if FLAGS.base_device == 'cpu':
if FLAGS.embedding_type in ('joint_fused', 'joint_sparse'):
print('WARNING: CUDA joint embeddings are not supported on CPU')
FLAGS.embedding_type = 'joint'
if FLAGS.amp:
print('WARNING: Automatic mixed precision not supported on CPU')
FLAGS.amp = False
if FLAGS.optimized_mlp:
print('WARNING: Optimized MLP is not supported on CPU')
FLAGS.optimized_mlp = False
if FLAGS.embedding_type == 'custom_cuda':