WHERE \ GROUP BY \ brings different results, when using CPU-only configurations and GPU-used configurations.
SQL with CPU-only Config:
CREATE TABLE t0(c0 money);
CREATE TABLE t1(LIKE t0);
INSERT INTO t1(c0) VALUES(CAST(0.9 AS MONEY)), ((-1.0E8)::MONEY), (CAST(0.1 AS MONEY));
UPDATE t0 SET c0=DEFAULT;
CREATE INDEX i0 ON t1(c0) INCLUDE(c0);
CREATE SCHEMA extensions;
CREATE EXTENSION pg_strom WITH SCHEMA extensions;
SET pg_strom.enabled=off;
SELECT BOOL_OR(FALSE) FROM t1 FULL OUTER JOIN t0 ON FALSE WHERE ((0.1)::MONEY)IS DISTINCT FROM(t0.c0) GROUP BY ((0.8)::MONEY) BETWEEN SYMMETRIC ((0.7)::MONEY) AND (t1.c0);
Result:
bool_or
---------
f
f
(2 rows)
SQL with GPU-used Config:
BEGIN;
SET LOCAL pg_strom.enabled=on;
SET LOCAL pg_strom.enable_gpuscan=on;
SET LOCAL pg_strom.enable_gpujoin=on;
SET LOCAL pg_strom.enable_gpupreagg=on;
SELECT BOOL_OR(FALSE) FROM t1 FULL OUTER JOIN t0 ON FALSE WHERE ((0.1)::MONEY)IS DISTINCT FROM(t0.c0) GROUP BY ((0.8)::MONEY) BETWEEN SYMMETRIC ((0.7)::MONEY) AND (t1.c0);
COMMIT;
Describe:
SELECT \ FROM \ JOIN \ WHERE \ GROUP BY \ brings different results, when using CPU-only configurations and GPU-used configurations.
qwebug
commented
3 weeks ago
kaigai
commented
2 weeks ago
- © Githubissues.
- Githubissues is a development platform for aggregating issues.
SQL with CPU-only Config:
Result:
SQL with GPU-used Config:
Result:
Environment:
Pg-strom Version: commit b1f04e4042a8990ee9b21263f08365982b5495b5
PostgreSQL Version: 15.6 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-20), 64-bit
CUDA Version: 12.2
NVIDIA Driver Version: 535.171.04
This problem came up at commit: https://github.com/heterodb/pg-strom/commit/b1f04e4042a8990ee9b21263f08365982b5495b5. And it has been fixed at https://github.com/heterodb/pg-strom/commit/f1da73a299e72447afd1f984d5255726071a0703, after my verification. Thanks to the developers for their contributions.
I also could not reproduce the problem in my environment.
Thanks for your reports.