GPU Module Changelog¶
This page documents the version history of the KDB-X GPU module, including released versions, fixes, and improvements.
3.0.0¶
Release date: 2026-11-09
This release adds the .gpu.tensor API and a simpler interface through one module with virtual GPU objects, descending sorts, per-call device selection, and correctness fixes that make GPU results match q.
New
- Added the
.gpu.tensorAPI for typed tensor data on the GPU: arithmetic and broadcasting, reductions and running scans, moving windows, sorting, linear algebra (mmu,inv,chol,lsq, and principal component analysis (PCA)), concatenation,takeandview, NumPy-style indexing (gather), and type conversion. Results stay on the GPU and interoperate with q data. - Added
.gpu.xdescand.gpu.idesc, the descending counterparts of.gpu.xascand.gpu.iasc. - Added
.gpu.onDev[d;f], which runsfwith devicedcurrent and restores the previous device when it returns or signals, for per-call device selection underpeach. The reference now documents that.gpu.setDevis per host thread. - Query expressions now support GUID columns in
min,max,&,|,mins,maxs,mmin,mmax, and ordering comparisons.
Breaking changes
.gpu:use`gpureturns GPU results as virtual objects and the separateuse`gmodule is removed. Every.gpuand.gpu.tensorfunction keeps its name and signature and still accepts q data; plain qselect,exec,select[n],lj,ij,aj,wj,xasc,meta,cols, andxkeywork on GPU tables. q primitives do not see inside a virtual object; see GPU objects.- The
use`gnames.gpu.qryand.gpu.device, the.gpu.tensorgroupsaggs,scans,movingandlinear, and the aliasesdve,xexp,flip,upsert, andrandom.rngare gone; use the.gpu/.gpu.tensornames in the reference.
Fixes and improvements
- Joins and searches: Single-key
.gpu.aj,.gpu.bin,.gpu.lj,.gpu.ij,.gpu.wj, and.gpu.wj1are faster on attributed key columns, which now include byte and month. The as-of join family matches enum keys across different domains and keeps q's null-time and window behavior. Mixed-typeinfollows q's rules, andxbarwith real, float or datetime divisors now matches q in previously divergent cases. - Floating-point fidelity: Comparisons, casts and grouped keys now match q's comparison tolerance (
1f=1+2 xexp -44is1b), subnormal and NaN handling, signed zeros and datetime keys in grouping,`g#lookups and sorts, and rounding in float-to-integer casts. - Aggregates and scans: Aggregates of aggregates under
by, constant aggregates per group, scans and moving operations of atoms, scalar booleans combined with per-row conditions, emptybygrouping, seededfillsandwavgwith atom operands now match q. Grouped integer sums wrap on overflow as q does. - Data transfer: A CUDA error during
.gpu.toor.gpu.fromnow reports a q error instead of ending the session. Failed uploads and appends release their resources and leave the target intact..j.jserializes GPU-resident columns. - Nested columns:
.gpu.takeand.gpu.sublistslice a nested column by rows, as q does. Operations that cannot support nested columns report an error instead of returning wrong results. - Memory and performance: Memory freed after an operation is kept for reuse, speeding up repeated queries. Empty
.gpu.takeand.gpu.sublistresults stay on the GPU, and grouped (`g#) appends keep a correct index. - Fixes:
.gpu.countof a keyed table returns the row count; the empty select phrase no longer returns row numbers for a column namedi;.gpu.sublistclamps negative counts like q; datetime columns sort without aborting the q session; GUID result columns in joins are copied at the right width and grouped GUID indexes no longer crash; unknown names in query expressions error instead of being read as data.
2.9.0¶
Release date: 2026-10-20
This release skips sorting for inputs that are already sorted, adds memory compaction with .gpu.compact, and fixes several bugs.
Fixes and improvements
- Fixed null and out-of-range fills in
.gpu.gatherand SQL column re-indexing for real, float, datetime, char, and symbol columns, including a symbol result corruption that could crash q..gpu.gathernow also accepts short and int index vectors, CPU-resident or GPU-resident. .gpu.ajand.gpu.binnow support 4-byte columns: int, month, date, minute, second, and time as the ordered column, and int as an equality column..gpu.asc,.gpu.iasc, and.gpu.xascskip the sort when the input already has the`sattribute.- Added
.gpu.compactto reclaim the capacity a GPU-resident object reserved for appending. Like a global amend in q, it signalsnoupdatefrom a secondary thread. - Setting a
global-scope setting of.gpu.configfrom a secondary thread now signalsnoupdate, as.gpu.compactdoes. Reading configuration is unaffected. - Implemented
.gpu.selectand.gpu.updatecolumn re-indexing, including nested re-indexing, composition with operations such asiasc, and support forwhereandby. Functionaliascsymbol-vector arguments support arbitrary depth and follow q's right-to-left application semantics. For example,(iasc;`source`index1`index2)is interpreted asiasc source[index1[index2]]. - Accelerated first-clause
=andinfilters in.gpu.selectand.gpu.updateusing the grouped (`g) attribute. Supports all column types except byte, month, and deprecated datetime.
2.8.0¶
Release date: 2026-09-01
Exec form of .gpu.select.
Fixes and improvements
.gpu.selectnow supports exec forms: the shapes of thebyand phrase arguments choose between select and exec semantics, as in native q.- Fixed some incorrect temporal casts.
2.7.0¶
Release date: 2026-08-26
Runtime configuration with .gpu.config, fby and .gpu.ungroup support, and sort, allocation, and comparison fixes.
Fixes and improvements
- Added
.gpu.configto get or set runtime configuration. - Added the
allocsetting to.gpu.config, choosing power-of-two device allocations (`buddy, the default and previous behavior) or exact-size ones (`tight).`tightcuts VRAM for data that isn't appended to, at the cost of every append reallocating. - Added
.gpu.ungroup. - Added support for
fbyin.gpu.selectand.gpu.update. - Added support for
.gpu.appendtaking a symbol atom naming a global as its first argument. It appends to that global and returns the symbol, similar to`t upsert y. - Added support in
.gpu.selectfor comparing an enumerated symbol column (type20h) to a symbol atom (type11h) with=and<>. For example:
q)T:.gpu.to ([]s:`sym$`AAPL`MSFT`AAPL;p:150 300 152)
q).gpu.from .gpu.select[T;enlist(=;`s;enlist`AAPL);0b;()]
- Deprecated
.gpu.setMemRelThresand.gpu.getMemRelThresin favor of thememRelThressetting of.gpu.config. - Fixed
.gpu.asc,.gpu.xascand two-key.gpu.ajfailing with an allocation error on empty input. - Fixed
.gpu.ascsorting against a null buffer, and.gpu.tofailing silently, on an allocation failure. - Fixed a comparison against a scalar returning wrong values in its last rows.
- Fixed incorrect sort order in
.gpu.xasc,.gpu.asc, and.gpu.iascwhen sorting on an enumerated symbol column with a large enumeration domain. - Fixed incorrect sort order in
.gpu.xasc,.gpu.asc, and.gpu.iascwhen sorting on an enumerated symbol column whose enumeration domain has more entries than the table has rows. - Fixed copy-on-write semantics of
.gpu.append. - Fixed a
GPU_LAUNCH_FAILerror when sorting on multiple columns, seen on some GPU architectures.
2.6.2¶
Release date: 2026-08-14
Where clauses rework.
Fixes and improvements
- Reworked how where clauses are applied to improve performance for highly selective queries.
2.6.1¶
Release date: 2026-08-12
Blackwell sm_120 architecture support.
Fixes and improvements
- Added support for the
sm_120architecture of Blackwell.
To find the correct version for your GPU, run nvidia-smi --query-gpu=compute_cap and multiply by 10 (for example, 10.0 → 100, 12.0 → 120).
2.6.0¶
Release date: 2026-08-12
Inner join, window join, covariance, correlation, and update support, additional .gpu.select operations, and .gpu.select fixes.
Fixes and improvements
- Added support for inner join
.gpu.ij. - Added support for window joins
.gpu.wjand.gpu.wj1, withsum,min,max,count,avg,first, andlastaggregations. - Added support for covariance, sample covariance, and correlation with
.gpu.cov,.gpu.scov, and.gpu.corfor GPU-resident float vectors. - Added support for
rankandxrankin.gpu.select. - Added support for
iascwith abyclause in.gpu.select. - Added support for
.gpu.update. - Fixed
iascunder awhereclause in.gpu.selectto match native q. - Fixed a bug in
.gpu.selectthat caused some operations to fail on boolean expressions.
2.5.0¶
Release date: 2026-07-28
This release adds support for Blackwell, additional .gpu.select operations, and .gpu.lj; it also improves performance and allocation-failure handling.
Fixes and improvements
- Added support for left join
.gpu.lj. - Added support for
emain.gpu.select. - Improved group-by sort performance in
.gpu.select. - Fixed a bug that terminated the process after an allocation failure instead of returning a recoverable error.
- Fixed a crash on an empty input to
.gpu.select. - Added Blackwell (sm_100) support.
2.4.0¶
Release date: 2026-07-16
Additional .gpu.select operation support and a groupby fix.
Fixes and improvements
- Added support for
fill(^) andfills(^\) in.gpu.select. - Added support for
ratiosanddeltasin.gpu.select. - Added support for
prev,xprev, andnextin.gpu.select. - Fixed a bug in
.gpu.selectthat manifested as missing results in agroupbyoperation.
2.3.0¶
Release date: 2026-06-30
Windowed scan operations & Sort performance improvements.
Fixes and improvements
- Added support for
msum,mmin,mmaxandmdevin.gpu.select. - Improved multi-column sort performance in
.gpu.xasc,.gpu.asc, and.gpu.iasc.
2.2.0¶
Release date: 2026-06-15
Scan operations, keyed tables, and performance improvements.
Fixes and improvements
- Added support for
prds,mins, andmaxsin.gpu.select. - Added support for keyed tables, which are now returned from
.gpu.selectwith abyclause. - Improved
.gpu.selectperformance by avoiding casts with bit-identical input and output.
2.1.0¶
Release date: 2026-06-02
Scan operation support and fixes.
Fixes and improvements
- Added support for
sumsandxexpin.gpu.select. - Allowed non-GPU-resident columns in
.gpu.xasc. Sorting on such columns (that is, the lhs arguments) remains unsupported. - Fixed
.gpu.selectto broadcast atomic results to match the size of other columns. - Fixed a crash in
.gpu.takewhen trying to create very large tables. - Fixed
.gpu.gatherhandling of null indices to match q semantics. Null indices now produce null output values instead of incorrectly reading from index0.
2.0.0¶
Release date: 2026-05-19
Nested data and richer .gpu.select.
Fixes and improvements
- Added support for columns of lists (1 level deep only). This enables
mavginside a.gpu.selectwith abyclause. - Improved sorting performance.
- Improved aggregate performance in
.gpu.select. - Added greater operator support in
.gpu.select: casting,dev,first,iasc,in,last,mavg,sqrt,var,wavg,within, andxbar. - Removed the requirement for an aggregate in the
selectphrase when using.gpu.selectwith abyclause. - Fixed integer-sum overflow.
- Exposed GPU memory pool configuration through
.gpu.setMemRelThresand.gpu.getMemRelThres. For more information, refer to CUDA memory pool documentation. - Exposed
cudaProfilerStartandcudaProfilerStopthrough.gpu.profiler.startand.gpu.profiler.stop. - Renamed device management functions:
ndevtocntDev,gdevtogetDev,sdevtosetDev, andmdevtomemDev.
1.0.1¶
Release date: 2026-04-30
Release fix.
Fixes and improvements
- Support for CUDA 12 alongside CUDA 13.
- Fixed build issue with some 1.0.0 packages.
1.0.0¶
Release date: 2026-03-31
Initial Release
Fixes and improvements
N/A