copyFromRawBytes(data) {
	        var _a;
	        // short cut for gpu copy
	        if (this.device.deviceType == DeviceStrToEnum.webgpu) {
	            (_a = this.lib.webGPUContext) === null || _a === void 0 ? void 0 : _a.copyRawBytesToBuffer(data, this.getDataPtr(), 0, data.length);
	            return this;
	        }
	        // CPU copy
	        const size = this.shape.reduce((a, b) => {
	            return a * b;
	        }, 1);
	        const nbytes = this.dlDataType.numStorageBytes() * size;
	        if (nbytes != data.length) {
	            throw new Error("Expect the data's length equals nbytes=" + nbytes);
	        }
	        const stack = this.lib.getOrAllocCallStack();
	        const tempOffset = stack.allocRawBytes(nbytes);
	        const tempPtr = stack.ptrFromOffset(tempOffset);
	        this.lib.memory.storeRawBytes(tempPtr, data);
	        this.lib.checkCall(this.lib.exports.TVMArrayCopyFromBytes(this.getHandle(), tempPtr, nbytes));
	        this.lib.recycleCallStack(stack);
	        return this;
	    }
Copy data from raw bytes.
@param data Uint8Array of bytes.
@returns this