@@ -293,6 +293,8 @@ def test_nvdiffrast_fwd_forward(
293
293
self , batch_size , height , width , pixel_coords ,
294
294
render_ranges , face_vertices_z , face_vertices_image ,
295
295
face_uvs , with_valid_faces , valid_faces ):
296
+ if os .getenv ('KAOLIN_TEST_NVDIFFRAST' , '0' ) == '0' :
297
+ pytest .skip (f'test is ignored as KAOLIN_TEST_NVDIFFRAST is not set' )
296
298
if face_vertices_image .dtype == torch .double :
297
299
pytest .skip ("nvdiffrast not compatible with double" )
298
300
kwargs = {}
@@ -328,6 +330,8 @@ def test_nvdiffrast_fwd_forward_with_list(
328
330
render_ranges , face_vertices_z , face_vertices_image ,
329
331
face_uvs , with_valid_faces , valid_faces , dtype ):
330
332
"""Test with list of tensors as features"""
333
+ if os .getenv ('KAOLIN_TEST_NVDIFFRAST' , '0' ) == '0' :
334
+ pytest .skip (f'test is ignored as KAOLIN_TEST_NVDIFFRAST is not set' )
331
335
if face_vertices_image .dtype == torch .double :
332
336
pytest .skip ("nvdiffrast not compatible with double" )
333
337
kwargs = {}
@@ -370,6 +374,8 @@ def test_nvdiffrast_fwd_backward(
370
374
self , batch_size , height , width , pixel_coords ,
371
375
render_ranges , face_vertices_z , face_vertices_image ,
372
376
face_uvs , with_valid_faces , valid_faces ):
377
+ if os .getenv ('KAOLIN_TEST_NVDIFFRAST' , '0' ) == '0' :
378
+ pytest .skip (f'test is ignored as KAOLIN_TEST_NVDIFFRAST is not set' )
373
379
if face_vertices_image .dtype == torch .double :
374
380
pytest .skip ("nvdiffrast not compatible with double" )
375
381
kwargs = {}
@@ -422,6 +428,8 @@ def test_nvdiffrast_fwd_backward_with_mask(
422
428
self , batch_size , height , width , pixel_coords ,
423
429
render_ranges , face_vertices_z , face_vertices_image ,
424
430
face_uvs , with_valid_faces , valid_faces ):
431
+ if os .getenv ('KAOLIN_TEST_NVDIFFRAST' , '0' ) == '0' :
432
+ pytest .skip (f'test is ignored as KAOLIN_TEST_NVDIFFRAST is not set' )
425
433
if face_vertices_image .dtype == torch .double :
426
434
pytest .skip ("nvdiffrast not compatible with double" )
427
435
kwargs = {}
@@ -482,6 +490,8 @@ def test_nvdiffrast_fwd_backward_with_mask(
482
490
def test_nvdiffrast_forward (
483
491
self , batch_size , height , width , face_vertices_z ,
484
492
face_vertices_image , face_uvs , with_valid_faces , valid_faces ):
493
+ if os .getenv ('KAOLIN_TEST_NVDIFFRAST' , '0' ) == '0' :
494
+ pytest .skip (f'test is ignored as KAOLIN_TEST_NVDIFFRAST is not set' )
485
495
if face_vertices_image .dtype == torch .double :
486
496
pytest .skip ("nvdiffrast not compatible with double" )
487
497
kwargs = {}
@@ -509,6 +519,8 @@ def test_nvdiffrast_forward_with_list(
509
519
self , batch_size , height , width , face_vertices_z ,
510
520
face_vertices_image , face_uvs , with_valid_faces , valid_faces ):
511
521
"""Test with list of tensors as features"""
522
+ if os .getenv ('KAOLIN_TEST_NVDIFFRAST' , '0' ) == '0' :
523
+ pytest .skip (f'test is ignored as KAOLIN_TEST_NVDIFFRAST is not set' )
512
524
if face_vertices_image .dtype == torch .double :
513
525
pytest .skip ("nvdiffrast not compatible with double" )
514
526
kwargs = {}
@@ -537,6 +549,8 @@ def test_nvdiffrast_forward_with_list(
537
549
def test_nvdiffrast_backward (
538
550
self , batch_size , height , width , face_vertices_z ,
539
551
face_vertices_image , face_uvs , with_valid_faces , valid_faces ):
552
+ if os .getenv ('KAOLIN_TEST_NVDIFFRAST' , '0' ) == '0' :
553
+ pytest .skip (f'test is ignored as KAOLIN_TEST_NVDIFFRAST is not set' )
540
554
if face_vertices_image .dtype == torch .double :
541
555
pytest .skip ("nvdiffrast not compatible with double" )
542
556
kwargs = {}
@@ -577,4 +591,3 @@ def test_nvdiffrast_backward(
577
591
assert torch .allclose (face_uvs .grad ,
578
592
face_uvs2 .grad ,
579
593
rtol = 1e-2 , atol = 1e-2 )
580
-
0 commit comments