@mineproness/tensorloop 2.1.56 → 2.1.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mineproness/tensorloop",
3
- "version": "2.1.56",
3
+ "version": "2.1.57",
4
4
  "description": "Raw-JAVASCRIPT Based Matirx and AI LLM Package called Tensorloop.",
5
5
  "keywords": [
6
6
  "ai",
@@ -1,4 +1,8 @@
1
1
  import fs from 'fs'
2
+ import path, { join, dirname, format } from 'path';
3
+ import { fileURLToPath } from 'url';
4
+
5
+ const __dirname = dirname(fileURLToPath(import.meta.url))
2
6
 
3
7
  export class OperationManager {
4
8
  device;
@@ -38,7 +42,7 @@ export class OperationManager {
38
42
  return result
39
43
  }
40
44
  getShaderPipline(filename, value = { "embedding": 123 }, entryPoint = "main") {
41
- let readShaderCode = fs.readFileSync(filename, "utf-8");
45
+ let readShaderCode = fs.readFileSync(path.join(__dirname, filename), "utf-8");
42
46
  if (value) {
43
47
  for (const a in value) {
44
48
  readShaderCode = readShaderCode.replaceAll(`%${a}%`, value[a])