Skip to content

Commit

Permalink
Merge branch 'master' into cugraphops-sageconv
Browse files Browse the repository at this point in the history
  • Loading branch information
tingyu66 authored Feb 21, 2023
2 parents 450c533 + 9ce80e8 commit 8d2f6c5
Show file tree
Hide file tree
Showing 667 changed files with 33,100 additions and 22,435 deletions.
20 changes: 18 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,26 @@ pipeline {
stage('CI') {
when { expression { !regression_test_done } }
stages {
stage('Abort Previous CI') {
steps {
script {
if (env.BRANCH_NAME != "master") {
// Jenkins will abort an older build if a newer build already
// passed a higher milestone.
// https://www.jenkins.io/doc/pipeline/steps/pipeline-milestone-step/
def buildNumber = env.BUILD_NUMBER as int
for (int i = 1; i <= buildNumber; i++) {
milestone(i)
}
}
}
}
}

stage('Lint Check') {
agent {
docker {
label "linux-cpu-node"
label "linux-benchmark-node"
image "dgllib/dgl-ci-lint"
alwaysPull true
}
Expand Down Expand Up @@ -587,7 +603,7 @@ pipeline {
sh("aws s3 sync ./ s3://dgl-ci-result/${JOB_NAME}/${BUILD_NUMBER}/${BUILD_ID}/logs/ --exclude '*' --include '*.log' --acl public-read --content-type text/plain")
sh("aws s3 sync ./ s3://dgl-ci-result/${JOB_NAME}/${BUILD_NUMBER}/${BUILD_ID}/logs/ --exclude '*.log' --acl public-read")

def comment = sh(returnStdout: true, script: "python3 status.py").trim()
def comment = sh(returnStdout: true, script: "python3 status.py --result ${currentBuild.currentResult}").trim()
echo(comment)
if ((env.BRANCH_NAME).startsWith('PR-')) {
pullRequest.comment(comment)
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/benchmarks/api/bench_add_self_loop.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import time

import numpy as np
import torch

import dgl
import dgl.function as fn

import numpy as np
import torch

from .. import utils


Expand Down
4 changes: 2 additions & 2 deletions benchmarks/benchmarks/api/bench_batch.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import time

import torch

import dgl

import torch

from .. import utils


Expand Down
6 changes: 3 additions & 3 deletions benchmarks/benchmarks/api/bench_builtin_apply_edges.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import time

import numpy as np
import torch

import dgl
import dgl.function as fn

import numpy as np
import torch

from .. import utils


Expand Down
6 changes: 3 additions & 3 deletions benchmarks/benchmarks/api/bench_builtin_apply_edges_hetero.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import time

import numpy as np
import torch

import dgl
import dgl.function as fn

import numpy as np
import torch

from .. import utils


Expand Down
48 changes: 25 additions & 23 deletions benchmarks/benchmarks/api/bench_builtin_multi_update_all.py
Original file line number Diff line number Diff line change
@@ -1,47 +1,49 @@
import time

import dgl
import torch
import numpy as np
import dgl.function as fn
import numpy as np
import torch

from .. import utils


@utils.benchmark('time', timeout=600)
@utils.parametrize('feat_size', [32, 128, 512])
@utils.parametrize('num_relations', [5, 50, 500])
@utils.parametrize('multi_reduce_type', ["sum", "stack"])
@utils.benchmark("time", timeout=600)
@utils.parametrize("feat_size", [32, 128, 512])
@utils.parametrize("num_relations", [5, 50, 500])
@utils.parametrize("multi_reduce_type", ["sum", "stack"])
def track_time(feat_size, num_relations, multi_reduce_type):
device = utils.get_bench_device()
dd = {}
candidate_edges = [dgl.data.CoraGraphDataset(verbose=False)[0].edges(), dgl.data.PubmedGraphDataset(verbose=False)[
0].edges(), dgl.data.CiteseerGraphDataset(verbose=False)[0].edges()]
candidate_edges = [
dgl.data.CoraGraphDataset(verbose=False)[0].edges(),
dgl.data.PubmedGraphDataset(verbose=False)[0].edges(),
dgl.data.CiteseerGraphDataset(verbose=False)[0].edges(),
]
for i in range(num_relations):
dd[('n1', 'e_{}'.format(i), 'n2')] = candidate_edges[i %
len(candidate_edges)]
dd[("n1", "e_{}".format(i), "n2")] = candidate_edges[
i % len(candidate_edges)
]
graph = dgl.heterograph(dd)

graph = graph.to(device)
graph.nodes['n1'].data['h'] = torch.randn(
(graph.num_nodes('n1'), feat_size), device=device)
graph.nodes['n2'].data['h'] = torch.randn(
(graph.num_nodes('n2'), feat_size), device=device)
graph.nodes["n1"].data["h"] = torch.randn(
(graph.num_nodes("n1"), feat_size), device=device
)
graph.nodes["n2"].data["h"] = torch.randn(
(graph.num_nodes("n2"), feat_size), device=device
)

# dry run
update_dict = {}
for i in range(num_relations):
update_dict['e_{}'.format(i)] = (
fn.copy_u('h', 'm'), fn.sum('m', 'h'))
graph.multi_update_all(
update_dict,
multi_reduce_type)
update_dict["e_{}".format(i)] = (fn.copy_u("h", "m"), fn.sum("m", "h"))
graph.multi_update_all(update_dict, multi_reduce_type)

# timing

with utils.Timer() as t:
for i in range(3):
graph.multi_update_all(
update_dict,
multi_reduce_type)
graph.multi_update_all(update_dict, multi_reduce_type)

return t.elapsed_secs / 3
6 changes: 3 additions & 3 deletions benchmarks/benchmarks/api/bench_builtin_update_all_coo.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import time

import numpy as np
import torch

import dgl
import dgl.function as fn

import numpy as np
import torch

from .. import utils


Expand Down
6 changes: 3 additions & 3 deletions benchmarks/benchmarks/api/bench_builtin_update_all_csc.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import time

import numpy as np
import torch

import dgl
import dgl.function as fn

import numpy as np
import torch

from .. import utils


Expand Down
4 changes: 2 additions & 2 deletions benchmarks/benchmarks/api/bench_edge_ids.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import time

import dgl

import numpy as np
import torch

import dgl

from .. import utils


Expand Down
6 changes: 3 additions & 3 deletions benchmarks/benchmarks/api/bench_edge_subgraph.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import time

import numpy as np
import torch

import dgl
import dgl.function as fn

import numpy as np
import torch

from .. import utils


Expand Down
4 changes: 2 additions & 2 deletions benchmarks/benchmarks/api/bench_find_edges.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import time

import dgl

import numpy as np
import torch

import dgl

from .. import utils


Expand Down
4 changes: 2 additions & 2 deletions benchmarks/benchmarks/api/bench_format_conversion.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import time

import dgl

import numpy as np
import torch

import dgl

from .. import utils


Expand Down
6 changes: 3 additions & 3 deletions benchmarks/benchmarks/api/bench_heterograph_construction.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import time

import numpy as np
import torch

import dgl
import dgl.function as fn

import numpy as np
import torch

from .. import utils


Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import time

import numpy as np
import torch

import dgl
import dgl.function as fn

import numpy as np
import torch

from .. import utils


Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import time

import numpy as np
import torch

import dgl
import dgl.function as fn

import numpy as np
import torch

from .. import utils


Expand Down
4 changes: 2 additions & 2 deletions benchmarks/benchmarks/api/bench_in_degrees.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import time

import dgl

import numpy as np
import torch

import dgl

from .. import utils


Expand Down
4 changes: 2 additions & 2 deletions benchmarks/benchmarks/api/bench_in_edges.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import time

import dgl

import numpy as np
import torch

import dgl

from .. import utils


Expand Down
6 changes: 3 additions & 3 deletions benchmarks/benchmarks/api/bench_in_subgraph.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import time

import numpy as np
import torch

import dgl
import dgl.function as fn

import numpy as np
import torch

from .. import utils


Expand Down
4 changes: 2 additions & 2 deletions benchmarks/benchmarks/api/bench_khop.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import time

import dgl

import numpy as np
import torch

import dgl

from .. import utils


Expand Down
4 changes: 2 additions & 2 deletions benchmarks/benchmarks/api/bench_knn_graph.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import time

import dgl

import numpy as np
import torch

import dgl

from .. import utils


Expand Down
4 changes: 2 additions & 2 deletions benchmarks/benchmarks/api/bench_metis_partition.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import time

import dgl

import numpy as np
import torch

import dgl

from .. import utils


Expand Down
6 changes: 3 additions & 3 deletions benchmarks/benchmarks/api/bench_nn_graphconv.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import time

import dgl
import dgl.function as fn

import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F

import dgl
import dgl.function as fn
from dgl.nn.pytorch import SAGEConv

from .. import utils
Expand Down
Loading

0 comments on commit 8d2f6c5

Please sign in to comment.