115 lines
3.2 KiB
Bash
Executable File
115 lines
3.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
echo "# RustyTorch++ Crate Compilation Report"
|
|
echo ""
|
|
echo "## Summary"
|
|
echo ""
|
|
|
|
# Categories and their crates
|
|
declare -A categories
|
|
categories["Core"]="rtx-tensor rtx-runtime rtx-autograd rtx-memory rtx-kernel rtx-bindings rtx-graph rtx-validation rtx-losses rtx-tokenization rtx-integration"
|
|
categories["Training"]="rtx-transformers rtx-distributed rtx-rl rtx-compress rtx-flash-attention rtx-preprocessing rtx-auto rtx-automeasure rtx-evolution rtx-federated rtx-model-merging"
|
|
categories["Models"]="rtx-vision rtx-vision-advanced rtx-multimodal rtx-diffuse rtx-timeseries rtx-nlg rtx-llm-tools rtx-gnn"
|
|
categories["Production"]="rtx-serving-api rtx-inference rtx-streaming rtx-hub rtx-config rtx-monitoring rtx-deployment rtx-pipeline rtx-resilience"
|
|
categories["Specialized"]="rtx-synthesis rtx-compiler rtx-geom rtx-polygraph rtx-sklearn-py rtx-ml-classic rtx-platform rtx-science rtx-nmf rtx-node"
|
|
categories["Data"]="rtx-feature-store rtx-data-validation rtx-etl"
|
|
categories["Tooling"]="rtx-eval rtx-bench"
|
|
categories["Meta"]="rtx rtx-core rtx-training rtx-inference-stack"
|
|
|
|
# Counters
|
|
total_crates=0
|
|
successful_crates=0
|
|
failed_crates=0
|
|
|
|
# Store results
|
|
results=""
|
|
|
|
# Function to check a crate
|
|
check_crate() {
|
|
local category=$1
|
|
local crate=$2
|
|
local path=""
|
|
|
|
# Determine path based on category
|
|
case $category in
|
|
"Core")
|
|
path="crates/core/$crate"
|
|
;;
|
|
"Training")
|
|
path="crates/training/$crate"
|
|
;;
|
|
"Models")
|
|
path="crates/models/$crate"
|
|
;;
|
|
"Production")
|
|
path="crates/production/$crate"
|
|
;;
|
|
"Specialized")
|
|
path="crates/specialized/$crate"
|
|
;;
|
|
"Data")
|
|
path="crates/data/$crate"
|
|
;;
|
|
"Tooling")
|
|
path="crates/tooling/$crate"
|
|
;;
|
|
"Meta")
|
|
path="crates/meta/$crate"
|
|
;;
|
|
esac
|
|
|
|
if [ -d "$path" ]; then
|
|
echo "Checking $crate..."
|
|
cd "$path"
|
|
|
|
# Capture both stdout and stderr
|
|
output=$(cargo check 2>&1)
|
|
exit_code=$?
|
|
|
|
cd - > /dev/null
|
|
|
|
((total_crates++))
|
|
|
|
if [ $exit_code -eq 0 ]; then
|
|
((successful_crates++))
|
|
return 0
|
|
else
|
|
((failed_crates++))
|
|
# Extract first error
|
|
first_error=$(echo "$output" | grep -E "error\[|error:" | head -1)
|
|
echo "$first_error" >&2
|
|
return 1
|
|
fi
|
|
else
|
|
echo "Path $path does not exist" >&2
|
|
return 2
|
|
fi
|
|
}
|
|
|
|
# Check each category
|
|
for category in "Core" "Training" "Models" "Production" "Specialized" "Data" "Tooling" "Meta"; do
|
|
results+="## $category Crates\n\n"
|
|
|
|
for crate in ${categories[$category]}; do
|
|
if check_crate "$category" "$crate"; then
|
|
results+="- ✅ $crate\n"
|
|
else
|
|
if [ $? -eq 2 ]; then
|
|
results+="- ⚠️ $crate (not found)\n"
|
|
else
|
|
results+="- ❌ $crate\n"
|
|
fi
|
|
fi
|
|
done
|
|
|
|
results+="\n"
|
|
done
|
|
|
|
# Print summary
|
|
echo "Total: $total_crates crates"
|
|
echo "Successful: $successful_crates crates"
|
|
echo "Failed: $failed_crates crates"
|
|
echo ""
|
|
|
|
# Print detailed results
|
|
echo -e "$results" |