// npm package
@antv/g-plugin-gpgpu
A G plugin for GPGPU based on WebGPU
versions
145
maintainers
51
license
MIT
first publish
2021-11-18
publisher
panyuqi
tarball
80,319 B
AUTO-PUBLISHED·1 version indexed·latest published 2023-09-11
// publisher campaignby panyuqi
9 caught packages from this accountThis is not an isolated catch. The same publisher has shipped 8 other packages that our pipeline flagged — the shape of a coordinated campaign, not a one-off. Each link below opens that sibling's analysis.
// offending code· @1.9.20· 1 file flagged
llm: benign · 0.85→ No suspicious destination, no remote-exec shape — 1 known-vendor host(s), 1 other host(s).
- @1.9.20··AUTO-PUBLISHED·publisher: panyuqiheuristic 75/100static flags 1llm benign (0.85) via ollamamature-packageosv-flagged:MAL-2026-3945public-github-push
→ No suspicious destination, no remote-exec shape — 1 known-vendor host(s), 1 other host(s).
// offending code· 1 file flaggedpatterns: 1
--- package/package.json (excerpt) --- { "name": "@antv/g-plugin-gpgpu", "version": "1.9.20", "description": "A G plugin for GPGPU based on WebGPU", "keywords": [ "webgpu", "gpgpu", "antv", "g" ], "homepage": "https://github.com/antvis/g#readme", "bugs": { "url": "https://github.com/antvis/g/issues" }, "repository": { "type": "git", "url": "git+https://github.com/antvis/g.git" }, "license": "MIT", "author": "https://github.com/orgs/antvis/people", "exports": { "types": "./dist/index.d.ts", "import": "./dist/index.esm.js", "default": "./dist/index.js" }, "main": "dist/index.js", "unpkg": "dist/index.umd.min.js", "module": "dist/index.esm.js", "types": "dist/index.d.ts", "files": [ "package.json", "dist", "LICENSE", "README.md" ], "dependencies": { "tslib": "^2.5.3", "@antv/g-lite": "1.2.13", "@antv/g-webgpu": "1.9.20" }, "publishConfig": { "access": "public" }, "scripts": { "build": "npm run clean && rollup -c", "clean": "rimraf dist", "sync": "tnpm sync", "watch": "rollup -c -w" } } --- package.json (entry) --- { "name": "@antv/g-plugin-gpgpu", "version": "1.9.20", "description": "A G plugin for GPGPU based on WebGPU", "keywords": [ "webgpu", "gpgpu", "antv", "g" ], "homepage": "https://github.com/antvis/g#readme", "bugs": { "url": "https://github.com/antvis/g/issues" }, "repository": { "type": "git", "url": "git+https://github.com/antvis/g.git" }, "license": "MIT", "author": "https://github.com/orgs/antvis/people", "exports": { "types": "./dist/index.d.ts", "import": "./dist/index.esm.js", "default": "./dist/index.js" }, "main": "dist/index.js", "unpkg": "dist/index.umd.min.js", "module": "dist/index.esm.js", "types": "dist/index.d.ts", "files": [ "package.json", "dist", "LICENSE", "README.md" ], "dependencies": { "tslib": "^2.5.3", "@antv/g-lite": "1.2.13", "@antv/g-webgpu": "1.9.20" }, "publishConfig": { "access": "public" }, "scripts": { "build": "npm run clean && rollup -c", "clean": "rimraf dist", "sync": "tnpm sync", "watch": "rollup -c -w" } } --- index.js (entry) --- 'use strict'; var tslib = require('tslib'); var gLite = require('@antv/g-lite'); var gWebgpu = require('@antv/g-webgpu'); exports.AST_TOKEN_TYPES = void 0; (function (AST_TOKEN_TYPES) { AST_TOKEN_TYPES["Void"] = "Void"; AST_TOKEN_TYPES["Boolean"] = "Boolean"; AST_TOKEN_TYPES["Float"] = "Float"; AST_TOKEN_TYPES["Uint32"] = "Uint32"; AST_TOKEN_TYPES["Int32"] = "Int32"; AST_TOKEN_TYPES["Vector"] = "Vector"; AST_TOKEN_TYPES["Vector2Float"] = "vec2<f32>"; AST_TOKEN_TYPES["Vector3Float"] = "vec3<f32>"; AST_TOKEN_TYPES["Vector4Float"] = "vec4<f32>"; AST_TOKEN_TYPES["Vector2Boolean"] = "vec2<bool>"; AST_TOKEN_TYPES["Vector3Boolean"] = "vec3<bool>"; AST_TOKEN_TYPES["Vector4Boolean"] = "vec4<bool>"; AST_TOKEN_TYPES["Vector2Uint"] = "vec2<u32>"; AST_TOKEN_TYPES["Vector3Uint"] = "vec3<u32>"; AST_TOKEN_TYPES["Vector4Uint"] = "vec4<u32>"; AST_TOKEN_TYPES["Vector2Int"] = "vec2<i32>"; AST_TOKEN_TYPES["Vector3Int"] = "vec3<i32>"; AST_TOKEN_TYPES["Vector4Int"] = "vec4<i32>"; AST_TOKEN_TYPES["Matrix"] = "Matrix"; AST_TOKEN_TYPES["Matrix3x3Float"] = "mat3x3<f32>"; AST_TOKEN_TYPES["Matrix4x4Float"] = "mat4x4<i32>"; --- bundled output (OSV-MAL flagged — LLM scope expansion) --- --- dist/Kernel.d.ts (bundled) --- import { DeviceRenderer } from '@antv/g-webgpu'; import type { KernelBundle } from './interface'; export interface KernelOptions { computeShader?: string; bundle?: KernelBundle; } export interface KernelBufferDescriptor { name?: string; binding?: number; data: ArrayBufferView; } export declare class Kernel { /** * WGSL code, won't be transpiled by compiler */ private computeShader; /** * bundle contains GLSL/WGSL */ private bundle; /** * underlying GPU device */ private device; private computePipeline; private buffers; constructor(device: DeviceRenderer.Device, { computeShader, bundle }: KernelOptions); private init; /** * set or update buffer by binding number, * it should match binding declared in compute shader */ setBinding(binding: number, buffer: DeviceRenderer.Buffer): any; dispatch(x: [number, number, number] | number, y?: number, z?: number): void; /** * readback buffer async */ readBuffer(buffer: DeviceRenderer.Buffer): Promise<ArrayBufferView>; destroy(): void; } --- dist/index.d.ts (bundled) --- import { AbstractRendererPlugin } from '@antv/g-lite'; export * from './interface'; export * from './Kernel'; export declare class Plugin extends AbstractRendererPlugin { name: string; init(): void; destroy(): void; } --- dist/index.esm.js (bundled) --- import { __spreadArray, __read, __awaiter, __generator, __extends } from 'tslib'; import { AbstractRendererPlugin } from '@antv/g-lite'; import { DeviceRenderer } from '@antv/g-webgpu'; var AST_TOKEN_TYPES; (function (AST_TOKEN_TYPES) { AST_TOKEN_TYPES["Void"] = "Void"; AST_TOKEN_TYPES["Boolean"] = "Boolean"; AST_TOKEN_TYPES["Float"] = "Float"; AST_TOKEN_TYPES["Uint32"] = "Uint32"; AST_TOKEN_TYPES["Int32"] = "Int32"; AST_TOKEN_TYPES["Vector"] = "Vector"; AST_TOKEN_TYPES["Vector2Float"] = "vec2<f32>"; AST_TOKEN_TYPES["Vector3Float"] = "vec3<f32>"; AST_TOKEN_TYPES["Vector4Float"] = "vec4<f32>"; AST_TOKEN_TYPES["Vector2Boolean"] = "vec2<bool>"; AST_TOKEN_TYPES["Vector3Boolean"] = "vec3<bool>"; AST_TOKEN_TYPES["Vector4Boolean"] = "vec4<bool>"; AST_TOKEN_TYPES["Vector2Uint"] = "vec2<u32>"; AST_TOKEN_TYPES["Vector3Uint"] = "vec3<u32>"; AST_TOKEN_TYPES["Vector4Uint"] = "vec4<u32>"; AST_TOKEN_TYPES["Vector2Int"] = "vec2<i32>"; AST_TOKEN_TYPES["Vector3Int"] = "vec3<i32>"; AST_TOKEN_TYPES["Vector4Int"] = "vec4<i32>"; AST_TOKEN_TYPES["Matrix"] = "Matrix"; AST_TOKEN_TYPES["Matrix3x3Float"] = "mat3x3<f32>"; AST_TOKEN_TYPES["Matrix4x4Float"] = "mat4x4<i32>"; AST_TOKEN_TYPES["Struct"] = "Struct"; AST_TOKEN_TYPES["FloatArray"] = "Float[]"; AST_TOKEN_TYPES["Vector4FloatArray"] = "vec4<f32>[]"; })(AST_TOKEN_TYPES || (AST_TOKEN_TYPES = {})); var AST_NODE_TYPES; (function (AST_NODE_TYPES) { AST_NODE_TYPES["Program"] = "Program"; AST_NODE_TYPES["Identifier"] = "Identifier"; AST_NODE_TYPES["VariableDeclaration"] = "VariableDeclaration"; AST_NODE_TYPES["BlockStatement"] = "BlockStatement"; AST_NODE_TYPES["ReturnStatement"] = "ReturnStatement"; AST_NODE_TYPES["FunctionDeclaration"] = "FunctionDeclaration"; AST_NODE_TYPES["VariableDeclarator"] = "VariableDeclarator"; AST_NODE_TYPES["AssignmentExpression"] = "AssignmentExpression"; AST_NODE_TYPES["LogicalExpres --- dist/index.js (bundled) --- 'use strict'; var tslib = require('tslib'); var gLite = require('@antv/g-lite'); var gWebgpu = require('@antv/g-webgpu'); exports.AST_TOKEN_TYPES = void 0; (function (AST_TOKEN_TYPES) { AST_TOKEN_TYPES["Void"] = "Void"; AST_TOKEN_TYPES["Boolean"] = "Boolean"; AST_TOKEN_TYPES["Float"] = "Float"; AST_TOKEN_TYPES["Uint32"] = "Uint32"; AST_TOKEN_TYPES["Int32"] = "Int32"; AST_TOKEN_TYPES["Vector"] = "Vector"; AST_TOKEN_TYPES["Vector2Float"] = "vec2<f32>"; AST_TOKEN_TYPES["Vector3Float"] = "vec3<f32>"; AST_TOKEN_TYPES["Vector4Float"] = "vec4<f32>"; AST_TOKEN_TYPES["Vector2Boolean"] = "vec2<bool>"; AST_TOKEN_TYPES["Vector3Boolean"] = "vec3<bool>"; AST_TOKEN_TYPES["Vector4Boolean"] = "vec4<bool>"; AST_TOKEN_TYPES["Vector2Uint"] = "vec2<u32>"; AST_TOKEN_TYPES["Vector3Uint"] = "vec3<u32>"; AST_TOKEN_TYPES["Vector4Uint"] = "vec4<u32>"; AST_TOKEN_TYPES["Vector2Int"] = "vec2<i32>"; AST_TOKEN_TYPES["Vector3Int"] = "vec3<i32>"; AST_TOKEN_TYPES["Vector4Int"] = "vec4<i32>"; AST_TOKEN_TYPES["Matrix"] = "Matrix"; AST_TOKEN_TYPES["Matrix3x3Float"] = "mat3x3<f32>"; AST_TOKEN_TYPES["Matrix4x4Float"] = "mat4x4<i32>"; AST_TOKEN_TYPES["Struct"] = "Struct"; AST_TOKEN_TYPES["FloatArray"] = "Float[]"; AST_TOKEN_TYPES["Vector4FloatArray"] = "vec4<f32>[]"; })(exports.AST_TOKEN_TYPES || (exports.AST_TOKEN_TYPES = {})); exports.AST_NODE_TYPES = void 0; (function (AST_NODE_TYPES) { AST_NODE_TYPES["Program"] = "Program"; AST_NODE_TYPES["Identifier"] = "Identifier"; AST_NODE_TYPES["VariableDeclaration"] = "VariableDeclaration"; AST_NODE_TYPES["BlockStatement"] = "BlockStatement"; AST_NODE_TYPES["ReturnStatement"] = "ReturnStatement"; AST_NODE_TYPES["FunctionDeclaration"] = "FunctionDeclaration"; AST_NODE_TYPES["VariableDeclarator"] = "VariableDeclarator"; AST_NODE_TYPES["AssignmentExpression"] = "AssignmentExpression"; AST_NODE_TYPES["LogicalExpression"] = "LogicalExpr --- dist/index.umd.min.js (bundled) --- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@antv/g-lite"),require("@antv/g-webgpu")):"function"==typeof define&&define.amd?define(["exports","@antv/g-lite","@antv/g-webgpu"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).G=e.G||{},e.G.GPGPU={}),e.window.G,e.window.G.WebGPU)}(this,(function(e,t,n){"use strict";var r,o,i,a,u=function(e,t){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},u(e,t)};function s(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function c(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(s){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&o[3]>u[1])){a.label=u[1];break}if(6===u[0]&&o[1]>a.label){a.label=o[1],o=u;break}if(o&&o[2]>a.label){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}}e.AST_TOKEN_TYPES=void 0,(r=e.AST_TOKEN_T --- dist/interface.d.ts (bundled) --- declare enum AST_TOKEN_TYPES { Void = "Void", Boolean = "Boolean", Float = "Float", Uint32 = "Uint32", Int32 = "Int32", Vector = "Vector", Vector2Float = "vec2<f32>", Vector3Float = "vec3<f32>", Vector4Float = "vec4<f32>", Vector2Boolean = "vec2<bool>", Vector3Boolean = "vec3<bool>", Vector4Boolean = "vec4<bool>", Vector2Uint = "vec2<u32>", Vector3Uint = "vec3<u32>",
