diff --git a/Jenkinsfile b/Jenkinsfile index 092bb1f84474..edd8a7bba806 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -152,9 +152,10 @@ pipeline { } stage('Bot Instruction') { agent { - kubernetes { - yamlFile 'docker/pods/ci-lint.yaml' - defaultContainer 'dgl-ci-lint' + docker { + label 'linux-benchmark-node' + image 'dgllib/dgl-ci-lint' + alwaysPull true } } steps { @@ -174,9 +175,10 @@ pipeline { stages { stage('Lint Check') { agent { - kubernetes { - yamlFile 'docker/pods/ci-lint.yaml' - defaultContainer 'dgl-ci-lint' + docker { + label "linux-cpu-node" + image "dgllib/dgl-ci-lint" + alwaysPull true } } steps { @@ -194,9 +196,11 @@ pipeline { parallel { stage('CPU Build') { agent { - kubernetes { - yamlFile 'docker/pods/ci-compile-cpu.yaml' - defaultContainer 'dgl-ci-cpu-compile' + docker { + label "linux-cpu-node" + image "dgllib/dgl-ci-cpu:cu101_v220217" + args "-u root" + alwaysPull true } } steps { @@ -210,9 +214,11 @@ pipeline { } stage('GPU Build') { agent { - kubernetes { - yamlFile 'docker/pods/ci-compile-gpu.yaml' - defaultContainer 'dgl-ci-gpu-compile' + docker { + label "linux-cpu-node" + image "dgllib/dgl-ci-gpu:cu101_v220217" + args "-u root" + alwaysPull true } } steps { @@ -245,9 +251,10 @@ pipeline { parallel { stage('C++ CPU') { agent { - kubernetes { - yamlFile 'docker/pods/ci-cpu.yaml' - defaultContainer 'dgl-ci-cpu' + docker { + label "linux-cpu-node" + image "dgllib/dgl-ci-cpu:cu101_v220217" + alwaysPull true } } steps { @@ -261,9 +268,11 @@ pipeline { } stage('C++ GPU') { agent { - kubernetes { - yamlFile 'docker/pods/ci-gpu.yaml' - defaultContainer 'dgl-ci-gpu' + docker { + label "linux-gpu-node" + image "dgllib/dgl-ci-gpu:cu101_v220217" + args "--runtime nvidia" + alwaysPull true } } steps { @@ -288,9 +297,10 @@ pipeline { } stage('Tensorflow CPU') { agent { - kubernetes { - yamlFile 'docker/pods/ci-cpu.yaml' - defaultContainer 'dgl-ci-cpu' + docker { + label "linux-cpu-node" + image "dgllib/dgl-ci-cpu:cu101_v220217" + alwaysPull true } } stages { @@ -308,9 +318,11 @@ pipeline { } stage('Tensorflow GPU') { agent { - kubernetes { - yamlFile 'docker/pods/ci-gpu.yaml' - defaultContainer 'dgl-ci-gpu' + docker { + label "linux-gpu-node" + image "dgllib/dgl-ci-gpu:cu101_v220217" + args "--runtime nvidia" + alwaysPull true } } stages { @@ -328,9 +340,11 @@ pipeline { } stage('Torch CPU') { agent { - kubernetes { - yamlFile 'docker/pods/ci-cpu.yaml' - defaultContainer 'dgl-ci-cpu' + docker { + label "linux-cpu-node" + image "dgllib/dgl-ci-cpu:cu101_v220217" + args "--shm-size=4gb" + alwaysPull true } } stages { @@ -378,9 +392,11 @@ pipeline { } stage('Torch GPU') { agent { - kubernetes { - yamlFile 'docker/pods/ci-gpu.yaml' - defaultContainer 'dgl-ci-gpu' + docker { + label "linux-gpu-node" + image "dgllib/dgl-ci-gpu:cu101_v220217" + args "--runtime nvidia --shm-size=8gb" + alwaysPull true } } stages { @@ -404,9 +420,10 @@ pipeline { } stage('MXNet CPU') { agent { - kubernetes { - yamlFile 'docker/pods/ci-cpu.yaml' - defaultContainer 'dgl-ci-cpu' + docker { + label "linux-cpu-node" + image "dgllib/dgl-ci-cpu:cu101_v220217" + alwaysPull true } } stages { @@ -429,9 +446,11 @@ pipeline { } stage('MXNet GPU') { agent { - kubernetes { - yamlFile 'docker/pods/ci-gpu.yaml' - defaultContainer 'dgl-ci-gpu' + docker { + label "linux-gpu-node" + image "dgllib/dgl-ci-gpu:cu101_v220217" + args "--runtime nvidia" + alwaysPull true } } stages { diff --git a/tests/pytorch/test_optim.py b/tests/pytorch/test_optim.py index b1a670b94ba9..14fa23a68cb3 100644 --- a/tests/pytorch/test_optim.py +++ b/tests/pytorch/test_optim.py @@ -178,7 +178,7 @@ def start_torch_adam_worker(rank, world_size, weight, has_zero_grad=False, th.distributed.barrier() @unittest.skipIf(os.name == 'nt', reason='Do not support windows yet') -@unittest.skipIf(F.ctx().type == 'gpu', reason='cpu only test') +@unittest.skipIf(F.ctx().type != 'cpu', reason='cpu only test') @pytest.mark.parametrize("num_workers", [2, 4]) def test_multiprocess_cpu_sparse_adam(num_workers): backend = 'gloo' @@ -282,7 +282,7 @@ def test_multiprocess_sparse_adam_cuda_tensor(num_workers): assert F.allclose(dgl_weight, torch_weight) @unittest.skipIf(os.name == 'nt', reason='Do not support windows yet') -@unittest.skipIf(F.ctx().type == 'gpu', reason='cpu only test') +@unittest.skipIf(F.ctx().type != 'cpu', reason='cpu only test') @pytest.mark.parametrize("num_workers", [2, 4]) def test_multiprocess_sparse_adam_cpu_zero_step(num_workers): backend = 'gloo'