Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions check.txt

This file was deleted.

7 changes: 7 additions & 0 deletions include/soft-cuda/tensor/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ size_t tensor_pool_used(tensor_pool_t *pool);
// bool tensor_move_device(tensor_t *t, device_type target_device, tensor_pool_t *pool);
// NEW IMPLEMENTATION

// DONE
bool execution_node_to_host(execution_node_t *node);
////////////////////////////////////////////////////////////////////////////////////////////

Expand Down Expand Up @@ -217,6 +218,7 @@ tensor_t *tensor_transpose(tensor_pool_t *pool, tensor_t *a);
tensor_t *tensor_add(tensor_pool_t *pool, tensor_t *x, tensor_t *y);

// Explicit broadcasting for layers (e.g., Y = XW + b)
// DONE
tensor_t *tensor_add_bias(tensor_pool_t *pool, const tensor_t *xw, const tensor_t *bias);

/////////////////////////////////////////////////////////////
Expand All @@ -237,6 +239,7 @@ tensor_t *tensor_add_bias(tensor_pool_t *pool, const tensor_t *xw, const tensor_
// @params out Output tensor
// @param a Input tensor

// DONE
tensor_t *tensor_relu(tensor_pool_t *pool, tensor_t *a);

// Compares result
Expand All @@ -250,9 +253,13 @@ bool tensor_fill_random_normal(tensor_t *t, float mean, float std_dev);
tensor_t *tensor_cross_entropy_loss(tensor_pool_t *pool, const tensor_t *predictions,
const tensor_t *targets);

// ***********************************************************************************
// TODO: HAVE TO UPDATED FUNC SIG SPEC
// Evalutes the operation(Forward) with depth=1
// @return boolean flag for status
// DONE
bool tensor_evaluate( tensor_pool_t *pool,tensor_t *t, float *d_a, float *d_b, float *d_res);
// DONE
bool tensor_evaluate_GPU( tensor_pool_t *pool,tensor_t *t, float *d_a, float *d_b, float *d_res);

/////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ int main() {

if (oki) {
cout << "=========================================== \n";
cout << "========= TACTICAL VRAM TRACE ============= \n";
cout << "========= VRAM TRACE ============= \n";

execution_node_t *node = seq.back();

Expand Down
9 changes: 9 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
black
ipython
matplotlib
pillow
requests
lxml
mercurial
meson
psutil
File renamed without changes.
1 change: 1 addition & 0 deletions scripts/coldstart/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.env
Empty file.
24 changes: 24 additions & 0 deletions scripts/coldstart/coldstart.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
cp coldstart.tmp coldstart.prev 2>/dev/null

git add ..

git commit -m "chore/ Running summarizer"
date=$(date +%Y-%m-%d_%H-%M-%S)
filename="agent_summary_${date}.log"
{
echo "=== GIT LOG ==="
git log --oneline -7
echo "=== GIT DIFF ==="
git diff HEAD
echo "=== TODO ==="
grep -r TODO ../src/ 2>/dev/null
echo "=== PREVIOUS SESSION SUMMARY ==="
[ -f coldstart.prev ] && cat coldstart.prev
} | python coldstart_agent.py > logs/${filename}

cat logs/${filename} > coldstart.tmp


git add ..

git commit -m "chore/ Summarizer completion logging"
29 changes: 29 additions & 0 deletions scripts/coldstart/coldstart_agent.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import os
from dotenv import load_dotenv, dotenv_values
from google import genai
from google.genai import types
import sys
load_dotenv()

client = genai.Client()

with open("system_prompt.txt", "r") as f:
SYSTEM_PROMPT= f.read()

history = sys.stdin.read()


res = client.models.generate_content(
model="gemini-3-flash-preview",
config=types.GenerateContentConfig(
system_instruction=SYSTEM_PROMPT,
thinking_config=types.ThinkingConfig(thinking_level="medium")
),
contents=history
)

reply = res.text

# NOTE: we are just printing it we will handle inputing in file in bash

print(reply)
61 changes: 61 additions & 0 deletions scripts/coldstart/system_prompt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
You are reconstructing the developer’s mental context after a break.

You are given a codebase snapshot containing:
- TODO comments
- Inline comments
- Recent changes
You will receive a raw data dump separated by headers (=== GIT LOG ===, === GIT DIFF ===, etc.). Use the previous session summary as your baseline, and use the diff/log to determine what changed
Your job is NOT to summarize code blindly.
Your job is to rebuild what the developer was thinking.

---

## OBJECTIVE

Extract intent, unfinished work, and next steps so the developer can resume instantly.

---

## OUTPUT FORMAT

### 1. What I Was Doing
- Current feature or problem being worked on
- Main goal in plain English

### 2. Active TODOs (Grouped)
- Group TODOs by feature or module
- Convert vague TODOs into clear tasks
- Highlight anything critical vs optional

### 3. Current State of the Code
- What is already implemented
- What is partially done
- What is missing

### 4. My Likely Next Steps
- Step-by-step continuation plan
- Order tasks logically (what should be done first)

### 5. Important Context I Should Not Forget
- Assumptions in the code
- Hacks / temporary fixes
- Constraints (performance, design decisions, etc.)

### 6. Risks / Tricky Areas
- Parts of the code that may break
- Areas that require careful thinking

---

## RULES

- Prioritize TODOs and comments over everything else
- Infer intent even if comments are messy or incomplete
- Do NOT restate large chunks of code
- Translate developer shorthand into clear reasoning
- Be practical, not verbose
- If something is unclear, state the uncertainty explicitly

---

You are helping the developer avoid the “what was I even doing?” moment.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/backend_cpu/math/relu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bool tensor_op_relu(tensor_pool_t *pool, tensor_t *t) {
assert(pool != NULL);
assert(t != NULL);

float* float_data = ((float*)(t->data));
float* float_data = ((float*)(t->a->data));

for(uint32_t i = 0; i < t->nvalues; i++) {
if (float_data[i] < 0) {
Expand Down
Loading