Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Update GPU image for CUDA 11.7 #14363

Merged
merged 7 commits into from
Mar 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/jenkins/docker-images.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
ci_arm: tlcpack/ci-arm:20230314-060145-ccc0b9162
ci_cortexm: tlcpackstaging/ci_cortexm:20230124-233207-fd3f8035c
ci_cpu: tlcpack/ci-cpu:20230308-070109-9d732d0fa
ci_gpu: tlcpack/ci-gpu:20230308-070109-9d732d0fa
ci_gpu: tlcpack/ci-gpu:20230318-060139-2ff41c615
ci_hexagon: tlcpack/ci_hexagon:20230127-185848-95fa22308
ci_i386: tlcpack/ci-i386:20221013-060115-61c9742ea
ci_lint: tlcpack/ci-lint:20221013-060115-61c9742ea
Expand Down
8 changes: 4 additions & 4 deletions src/target/target_kind.cc
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ TargetJSON UpdateCUDAAttrs(TargetJSON target) {
// Use the compute version of the first CUDA GPU instead
TVMRetValue version;
if (!DetectDeviceFlag({kDLCUDA, 0}, runtime::kComputeVersion, &version)) {
LOG(WARNING) << "Unable to detect CUDA version, default to \"-arch=sm_20\" instead";
archInt = 20;
LOG(WARNING) << "Unable to detect CUDA version, default to \"-arch=sm_50\" instead";
archInt = 50;
} else {
archInt = std::stod(version.operator std::string()) * 10 + 0.1;
}
Expand All @@ -189,8 +189,8 @@ TargetJSON UpdateNVPTXAttrs(TargetJSON target) {
// Use the compute version of the first CUDA GPU instead
TVMRetValue version;
if (!DetectDeviceFlag({kDLCUDA, 0}, runtime::kComputeVersion, &version)) {
LOG(WARNING) << "Unable to detect CUDA version, default to \"-mcpu=sm_20\" instead";
arch = 20;
LOG(WARNING) << "Unable to detect CUDA version, default to \"-mcpu=sm_50\" instead";
arch = 50;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SM20 is no longer supported by CUDA 11.7, it's too old (more than 10 years ago gpu)

} else {
arch = std::stod(version.operator std::string()) * 10 + 0.1;
}
Expand Down
12 changes: 10 additions & 2 deletions tests/python/frontend/tensorflow/test_forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ def compare_tf_with_tvm(
targets=None,
ignore_in_shape=False,
convert_config=None,
atol=1e-5,
rtol=1e-5,
):
"""Generic function to generate and compare tensorflow and TVM output"""

Expand Down Expand Up @@ -303,7 +305,7 @@ def name_without_num(name):
for i, tf_out in enumerate(tf_output):
if not isinstance(tf_out, np.ndarray):
assert len(tvm_output[i].shape) == 0 # pylint: disable=len-as-condition
tvm.testing.assert_allclose(tf_out, tvm_output[i], atol=1e-5, rtol=1e-5)
tvm.testing.assert_allclose(tf_out, tvm_output[i], atol=atol, rtol=rtol)

sess.close()

Expand Down Expand Up @@ -3401,6 +3403,8 @@ def _test_forward_crop_and_resize(
extrapolation_value=0.0,
method="bilinear",
dtype="float32",
atol=1e-4,
rtol=1e-4,
):
image = np.random.uniform(0, 10, size=img_shape).astype(dtype)
tf.reset_default_graph()
Expand All @@ -3415,7 +3419,7 @@ def _test_forward_crop_and_resize(
extrapolation_value=extrapolation_value,
name="crop_and_resize",
)
compare_tf_with_tvm([image], ["in_data:0"], "crop_and_resize:0")
compare_tf_with_tvm([image], ["in_data:0"], "crop_and_resize:0", atol=atol, rtol=rtol)


def test_forward_crop_and_resize():
Expand Down Expand Up @@ -3444,6 +3448,8 @@ def test_forward_crop_and_resize():
box_idx=[1, 0, 2, 3],
crop_size=[24, 24],
extrapolation_value=0.3,
atol=1e-3,
rtol=1e-3,
)
_test_forward_crop_and_resize(
img_shape=[20, 229, 229, 3],
Expand All @@ -3452,6 +3458,8 @@ def test_forward_crop_and_resize():
crop_size=[58, 58],
extrapolation_value=0.2,
method="nearest",
atol=1e-3,
rtol=1e-3,
)


Expand Down
1 change: 1 addition & 0 deletions tests/scripts/request_hook/request_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
"https://github.com/dmlc/web-data/raw/main/gluoncv/detection/street_small.jpg": f"{BASE}/2022-10-05/gluon-small-stree.jpg",
"https://github.com/dmlc/web-data/raw/main/tensorflow/models/Custom/placeholder.pb": f"{BASE}/dmlc/web-data/raw/main/tensorflow/models/Custom/placeholder.pb",
"https://github.com/dmlc/web-data/raw/main/tensorflow/models/InceptionV1/classify_image_graph_def-with_shapes.pb": f"{BASE}/dmlc/web-data/raw/main/tensorflow/models/InceptionV1/classify_image_graph_def-with_shapes.pb",
"https://github.com/dmlc/web-data/raw/main/tensorflow/models/ResnetV2/resnet-20180601_resnet_v2_imagenet-shapes.pb": f"{BASE}/dmlc/web-data/raw/main/tensorflow/models/ResnetV2/resnet-20180601_resnet_v2_imagenet-shapes.pb",
"https://github.com/dmlc/web-data/raw/main/tensorflow/models/InceptionV1/elephant-299.jpg": f"{BASE}/dmlc/web-data/raw/main/tensorflow/models/InceptionV1/elephant-299.jpg",
"https://github.com/dmlc/web-data/raw/main/tensorflow/models/InceptionV1/imagenet_2012_challenge_label_map_proto.pbtxt": f"{BASE}/dmlc/web-data/raw/main/tensorflow/models/InceptionV1/imagenet_2012_challenge_label_map_proto.pbtxt",
"https://github.com/dmlc/web-data/raw/main/tensorflow/models/InceptionV1/imagenet_synset_to_human_label_map.txt": f"{BASE}/dmlc/web-data/raw/main/tensorflow/models/InceptionV1/imagenet_synset_to_human_label_map.txt",
Expand Down