Skip to content
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2025, NVIDIA CORPORATION.
# Copyright (c) 2025-2026, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -40,7 +40,7 @@ def test_hllpp_reduction(data_gen):

# precision = Math.ceil(2.0d * Math.log(1.106d / relativeSD) / Math.log(2.0d)).toInt
_relativeSD = [
pytest.param(0.3, marks=pytest.mark.xfail(reason="https://github.com/NVIDIA/spark-rapids/issues/12452")), # precision 4
0.3, # precision 4
0.25, # precision 5
0.15, # precision 6
0.1, # precision 7
Expand Down Expand Up @@ -68,11 +68,7 @@ def test_hllpp_precisions_reduce(relativeSD):

@pytest.mark.skipif(is_databricks_runtime(), reason="HyperLogLogPlusPlus does not support Databricks currently(https://github.com/NVIDIA/spark-rapids/issues/12388)")
@ignore_order(local=True)
@pytest.mark.parametrize('relativeSD',
[x if x != 0.3
else pytest.param(x, marks=pytest.mark.xfail(reason="https://github.com/NVIDIA/spark-rapids/issues/12452"))
for x in _relativeSD],
ids=idfn)
@pytest.mark.parametrize('relativeSD', _relativeSD, ids=idfn)
def test_hllpp_precisions_groupby(relativeSD):
assert_gpu_and_cpu_are_equal_sql(
lambda spark: gen_df(spark, [("c1", int_gen), ("c2", int_gen)]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4125,14 +4125,12 @@ object GpuOverrides extends Logging {
}
val precision = GpuHyperLogLogPlusPlus.computePrecision(a.relativeSD)
// Spark supports precision range: [4, Infinity)
// Spark-Rapids only supports precision range: [5, 14]
if (precision <= 4 || precision > 14) {
//
// Info: cuCollection supports precision range [4, 18]
// Due to https://github.com/NVIDIA/spark-rapids/issues/12347, the Spark-Rapids supports
// fewer precisions than cuCollection: range: [5, 14]
willNotWorkOnGpu(s"The precision $precision from relativeSD ${a.relativeSD} is bigger" +
s" than 14, GPU only supports precision range [5, 14].")
// cuCollection supports precision range: [4, 18]
// Spark-Rapids only supports precision range: [4, 14],
// GPU does not perform well for precision > 14.
if (precision < 4 || precision > 14) {
willNotWorkOnGpu(s"The precision $precision from relativeSD ${a.relativeSD} is out of" +
s" range, GPU only supports precision range [4, 14].")
}
}

Expand Down
Loading