Why does double type get rounded when adding in a static_map #603
-
I was trying to write tpch query (q3 in particular). Here we need to groupby and aggregate the revenue column which is in double format.
The results I see are rounded
the expected results should look something like this
Is this device dependent? I am running on RTX 2050 with cuda version 12.4. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@avithemad Is it possible to get a minimal repro in https://godbolt.org/z/1GvxoKbP3? The cudf groupby and aggregate operations also utilize cuco hash tables, but we haven't observed any of the rounding errors mentioned here. Since cuco hash tables store data exactly as provided, the issue is more likely with the aggregation. You might want to examine the following details more closely: double res = l_extendedprice[tid]*(1.0f - l_discount[tid]); Since |
Beta Was this translation helpful? Give feedback.
@avithemad Is it possible to get a minimal repro in https://godbolt.org/z/1GvxoKbP3?
The cudf groupby and aggregate operations also utilize cuco hash tables, but we haven't observed any of the rounding errors mentioned here. Since cuco hash tables store data exactly as provided, the issue is more likely with the aggregation. You might want to examine the following details more closely:
Since
1.0f
is afloat
, you might want to use1.
or1.0
to prevent narrow conversions. Also, could it be an issue with how the output is being printed, for example, by converting the value to an integer before printing?