PageSourceSearch

https://oneinfer.ai/_next/static/chunks/pages/console/kernels-0b045c783bc53186.js

js oneinfer.ai collected 2026-10-05 12:23:51 UTC 44,640 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2651],{70850:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/console/kernels",function(){return r(70962)}])},18178:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(63759).Z)("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]])},33243:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(63759).Z)("List",[["line",{x1:"8",x2:"21",y1:"6",y2:"6",key:"7ey8pc"}],["line",{x1:"8",x2:"21",y1:"12",y2:"12",key:"rjfblc"}],["line",{x1:"8",x2:"21",y1:"18",y2:"18",key:"c3b1m8"}],["line",{x1:"3",x2:"3.01",y1:"6",y2:"6",key:"1g7gq3"}],["line",{x1:"3",x2:"3.01",y1:"12",y2:"12",key:"1pjlvk"}],["line",{x1:"3",x2:"3.01",y1:"18",y2:"18",key:"28t2mc"}]])},78363:function(e,t,r){"use strict";r.d(t,{a9:function(){return o},cs:function(){return s},dE:function(){return l}});var n=r(6733),i=r(29204);let a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.fromEntries(Object.entries(e).map(e=>{let[t,r]=e;return[t.toLowerCase(),r]}))},s=async e=>{try{var t,r;let i=await n.ZP.get("/v1/developer/get-provider-info?provider=".concat(e,"&_t=").concat(Date.now()));if((null===(r=i.data)||void 0===r?void 0:null===(t=r.api_details)||void 0===t?void 0:t.api_status)!=="success")return{volumes:[],images:[],instances:[]};{let t=i.data.data.provider_info;if("all"!==e)return{logo:t.logo||"",volumes:(t.volumes||[]).map(e=>{var t,r;return{type:e.type||"",price:{price_per_month_per_gb:a(null===(t=e.price)||void 0===t?void 0:t.price_per_month_per_gb),currency:(null===(r=e.price)||void 0===r?void 0:r.currency)||""}}}),images:(t.images||[]).map(e=>({id:e.id||e.image_id||"",name:e.name||"",details:e.details||"",image_url:e.image_url||"",ports:e.ports||[],envs:e.envs||[],start_command:e.start_command||""})),instances:(t.instances||[]).map(t=>{var r,n,i,a;return{id:t.id||"",provider_name:t.provider_name||e,compute_type:t.compute_type||"GPU",plan_id:t.plan_id||t.id||"",plan_type:t.plan_type||"",is_available:t.is_available,gpu_id:t.gpu_id||"",chip_id:t.chip_id||"",cpu_id:t.cpu_id||"",name:t.name||t.gpu_name||"",gpu:{description:(null===(r=t.gpu)||void 0===r?void 0:r.description)||"",number_of_gpus:(null===(n=t.gpu)||void 0===n?void 0:n.number_of_gpus)||0},cpu:{description:(null===(i=t.cpu)||void 0===i?void 0:i.description)||"",number_of_cores:(null===(a=t.cpu)||void 0===a?void 0:a.number_of_cores)||0},ram:t.RAM?{description:t.RAM.description||"",size_in_gigabytes:t.RAM.size_in_gigabytes||0}:void 0,vram:t.VRAM?{description:t.VRAM.description||"",size_in_gigabytes:t.VRAM.size_in_gigabytes||0}:void 0,price_per_hour:t.price_per_hour||0,regions:t.regions||[],manufacturer:t.manufacturer||"",provider_price_per_hour_usd:t.provider_price_per_hour_usd||0,region_prices:t.region_prices||{}}})};{let e={};for(let r of Object.keys(t)){let n=t[r];e[r]={logo:n.logo||"",volumes:(n.volumes||[]).map(e=>{var t,r;return{type:e.type||"",price:{price_per_month_per_gb:a(null===(t=e.price)||void 0===t?void 0:t.price_per_month_per_gb),currency:(null===(r=e.price)||void 0===r?void 0:r.currency)||""},region_id:null==e?void 0:e.id}}),images:(n.images||[]).map(e=>({id:e.id||e.image_id||"",name:e.name||"",details:e.details||"",image_url:e.image_url||"",ports:e.ports||[],envs:e.envs||[],start_command:e.start_command||""})),instances:(n.instances||[]).map(e=>{var t,n,i,a;return{id:e.id||"",provider_name:e.provider_name||r,compute_type:e.compute_type||"GPU",plan_id:e.plan_id||"",plan_type:e.plan_type||"",is_available:e.is_available,gpu_id:e.gpu_id||"",chip_id:e.chip_id||"",cpu_id:e.cpu_id||"",name:e.name||"",gpu:{description:(null===(t=e.gpu)||void 0===t?void 0:t.description)||"",number_of_gpus:(null===(n=e.gpu)||void 0===n?void 0:n.number_of_gpus)||0},cpu:{description:(null===(i=e.cpu)||void 0===i?void 0:i.description)||"",number_of_cores:(null===(a=e.cpu)||void 0===a?void 0:a.number_of_cores)||0},ram:e.RAM?{description:e.RAM.description||"",size_in_gigabytes:e.RAM.size_in_gigabytes||0}:void 0,vram:e.VRAM?{description:e.VRAM.description||"",size_in_gigabytes:e.VRAM.size_in_gigabytes||0}:void 0,price_per_hour:e.price_per_hour||0,regions:e.regions||[],manufacturer:e.manufacturer||"",price_per_month:e.price_per_month||0,provider_price_per_hour_usd:e.provider_price_per_hour_usd||0,region_prices:e.region_prices||{},storage:e.storage,bandwidth_gb:e.bandwidth_gb||0,disk_type:e.disk_type||"",vcpu_type:e.v
1cpu_type||""}})}}return e}}}catch(t){if("all"===e)return{};return{volumes:[],images:[],instances:[]}}},o=async()=>{let e=await s("all");return"object"!=typeof e||Array.isArray(e)?{}:e},l=async()=>{try{var e,t;let r=await n.ZP.get("/v1/gpu-specs");if((null===(t=r.data)||void 0===t?void 0:null===(e=t.api_details)||void 0===e?void 0:e.api_status)==="success")return r.data.data.gpus.map(e=>({_id:e._id,chipId:e.chip_id,modelName:e.gpu_name,manufacturer:e.manufacturer,productCategory:e.product_category,architecture:e.architecture,formFactor:e.form_factor,launchDate:e.launch_date,endOfLifeDate:e.end_of_life_date,dataLastUpdated:e.data_last_updated,verificationStatus:e.verification_status,notes:e.notes,aiPerformance:e.ai_performance,benchmarkResults:e.benchmark_results,compute_specs:e.compute_specs,clock_speeds:e.clock_speeds,memory_specs:e.memory_specs,inference_performance:e.inference_performance,training_performance:e.training_performance,multi_gpu_capabilities:e.multi_gpu_capabilities,power_efficiency:e.power_efficiency,technical_specs:e.technical_specs,pricing_info:e.pricing_info,competitive_positioning:e.competitive_positioning,target_use_cases:e.target_use_cases,software_support:e.software_support,data_sources:e.data_sources,geekbench_scores:e.geekbench_scores,gpuPerformance:e.gpu_performance}));return[]}catch(e){return console.error(e),i.d7,[]}}},95973:function(e,t,r){"use strict";r.d(t,{Ce:function(){return s},zp:function(){return a},HO:function(){return o}});let n={"0.5b":5e8,"1b":1e9,"3b":3e9,"7b":7e9,"13b":13e9,"27b":27e9,"34b":34e9,"70b":7e10,"110b":11e10,"405b":405e9};function i(e){return n[e.toLowerCase()]||0}let a=async()=>{let e="https://api.oneinfer.ai";e.endsWith("/")||(e+="/");let t=window.localStorage.getItem("accessToken"),r=window.localStorage.getItem("developerId"),n=await fetch("".concat(e,"v1/developer/").concat(r,"/get-optimized-kernel-price"),{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t)}});if(!n.ok)throw Error("Failed to fetch kernel price");return(await n.json()).data.price/100},s=(e,t,r,n,a)=>(function(e,t){let r=e.parameter_count;if(!r&&e.model_size&&(r=i(e.model_size)),!r&&e.model_id){let t=function(e){for(let t of[/(\d+(?:\.\d+)?b)(?:-|_|$)/i]){let r=e.match(t);if(r)return r[1].toLowerCase()}return null}(e.model_id);t&&(r=i(t))}r||(r=7e9);let n=e.memory_required_gb||r/1e9*2;!function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]}(r,n);let a=(r/1e9*50+.015*(t.price_per_hour||1)*100+Math.min(2*n,30))/100;return r>5e10?a*=.9:r>3e10&&(a*=.95),a=Math.max(5,Math.min(100,a))})({model_id:e},{gpu_id:t,gpu_name:r,vram_gb:n,price_per_hour:a}),o=async e=>{let t="https://api.oneinfer.ai";t.endsWith("/")||(t+="/");let r=localStorage.getItem("accessToken"),n=localStorage.getItem("developerId");try{let i=await fetch("".concat(t,"v1/developer/").concat(n,"/validate-huggingface-url"),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(r)},body:JSON.stringify({huggingface_url:e})});if(!i.ok)return{is_valid:!1};return(await i.json()).data}catch(e){return console.error("Failed to validate Huggingface URL:",e),{is_valid:!1}}}},76498:function(e,t,r){"use strict";var n=r(85893);r(67294),t.Z=e=>{let{isOpen:t,onClose:r,title:i,children:a,maxWidth:s="max-w-3xl",hideCloseButton:o=!1,className:l="",bodyClassName:c=""}=e;return t?(0,n.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-[rgba(248,248,252,0.65)] p-4 backdrop-blur-sm",onClick:e=>{e.target===e.currentTarget&&r()},children:(0,n.jsxs)("div",{className:"bg-white rounded-[18px] w-full ".concat(s," max-h-[90vh] overflow-y-auto shadow-[0_24px_60px_-24px_rgba(79,70,229,0.45)] border border-[#e8e5f2] ").concat(l),onClick:e=>e.stopPropagation(),children:[(0,n.jsxs)("div",{className:"flex justify-between items-center p-4 border-b border-[#eeecf5] bg-gradient-to-r from-[#f8f8fc] to-[#f1effe]",children:[(0,n.jsx)("h2",{className:"text-lg font-bold text-[#15131f]",children:i}),!o&&(0,n.jsx)("button",{onClick:r,className:"text-gray-400 hover:text-gray-600 focus:outline-none p-1 rounded-full hover:bg-white/50 transition-colors",children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,n.jsx)("div",{className:"p-4 ".concat(c),children:a})]})}):null}},70962:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return z}});var n=r(85893),i=r(67294),a=r(9008),s=r.n(a),o=r(55695),l=r(1515),c=r(68001),d=r(26255),m=r(52956),u=r(18178),p=r(33243),g=r(76498),h=r(95973),f=r(78363),x=r(36197);let v="https://i.ibb.co/fGV3cccB/nvidia-small-logo-1.png",y=e=>(e||"").replace(/^NVIDIA\s+/i,"").trim(),b="oneinfer_kernel_demo_jobs",_=[3e3,4e3,5e3,7e3,1e4],j=["4774951ad3af4a68865add28795b810a","53eba8a2f4a94292a43379cc211bd407"],w=()=>({estimated_speedup:"1.25x faster",base_serving_library:"vLLM",throughput_improvement:"25%",latency_reduction:"27%",kernel_package:"kernel_lib_v1.0.tar.gz"}),G=[{id:"model-profiling",name:"Model Profiling",description:"Analyzing model architecture and parameters",minDuration:6e5,maxDuration:9e5},{id:"gpu-profiling",name:"GPU Profiling",description:"Profiling GPU memory and compute utilization",minDuration:7e5,maxDuration:1e6},{id:"seed-strategies",name:"Generating Seed Strategies",description:"Creating initial kernel optimization strategies",minDuration:8e5,maxDuration:11e5},{id:"generate-kernels",name:"Generating Kernels",description:"Synthesizing optimized kernel code",minDuration:12e5,maxDuration:18e5},{id:"kernel-bench",name:"Simulating Kernel Bench Tasks",description:"Running benchmark simulations on generated kernels",minDuration:18e5,maxDuration:24e5},{id:"regenerate-kernels",name:"Regenerating Kernels",description:"Refining kernels based on benchmark results",minDuration:12e5,maxDuration:15e5},{id:"compilation",name:"Compilation Checks",description:"Verifying kernel compilation and syntax",minDuration:6e5,maxDuration:9e5},{id:"verification",name:"Verification Checks",description:"Running correctness and safety verification tests",minDuration:1e6,maxDuration:13e5}
1,{id:"finalizing",name:"Finalizing",description:"Finalizing kernel generation process",minDuration:5e5,maxDuration:8e5},{id:"benchmarking",name:"Benchmarking",description:"Final performance benchmarking",minDuration:15e5,maxDuration:2e6},{id:"perf-check",name:"Checking Performance",description:"Analyzing performance improvements",minDuration:6e5,maxDuration:9e5}],k=()=>G.map(()=>{let e=Math.floor(Math.random()*_.length);return _[e]}),B=e=>Array.isArray(e.step_durations)&&e.step_durations.length===G.length?e.step_durations:G.map((e,t)=>_[t%_.length]),N=e=>(e?B(e):_).reduce((e,t)=>e+t,0),D={"model-profiling":["[INFO] [00:00] Loading model checkpoint...","[DEBUG] [00:15] Parsing model architecture from config.json","[DEBUG] [00:45] Loading weights from Hugging Face","[DEBUG] [01:30] Model structure: 32 transformer layers detected","[DEBUG] [02:00] Total parameters: 7B","[DEBUG] [02:45] Embedding dimensions: 4096, Hidden size: 11008","[DEBUG] [03:15] Attention heads: 32, Head dimension: 128","[DEBUG] [04:00] Computing tensor statistics for each layer...","[DEBUG] [05:00] Layer 1-8: Average activation magnitude: 2.34","[DEBUG] [06:00] Layer 9-16: Average activation magnitude: 1.98","[DEBUG] [07:00] Layer 17-24: Average activation magnitude: 2.15","[DEBUG] [08:00] Layer 25-32: Average activation magnitude: 1.87","[DEBUG] [09:00] Memory footprint: 14.2GB (FP32), 7.1GB (FP16), 3.6GB (INT8)","[INFO] [10:00] Model profiling completed"],"gpu-profiling":["[INFO] [00:00] Initializing GPU profiler...","[DEBUG] [00:30] Detecting NVIDIA GPU architecture...","[DEBUG] [01:00] GPU detected: NVIDIA RTX 4090","[DEBUG] [01:45] GPU Memory: 24GB GDDR6X","[DEBUG] [02:30] Memory bandwidth: 936 GB/s","[DEBUG] [03:15] GPU Compute Capability: 8.9","[DEBUG] [04:00] CUDA cores: 16384","[DEBUG] [05:00] Running synthetic memory bandwidth test...","[DEBUG] [06:30] Measured bandwidth: 842 GB/s (90% of theoretical)","[DEBUG] [08:00] Running compute performance test...","[DEBUG] [09:30] Measured peak FP32: 82.6 TFLOPS","[DEBUG] [11:00] Measured peak TF32: 660.8 TFLOPS","[DEBUG] [12:00] Peak memory utilization potential: 23.8GB","[DEBUG] [13:00] Average compute utilization profile: 87.5%","[INFO] [14:00] GPU profiling completed"],"seed-strategies":["[INFO] [00:00] Analyzing bottlenecks from profiling data...","[DEBUG] [01:00] Scanning 32 transformer layers for hotspots...","[DEBUG] [02:30] Identified 18 hot spots in attention mechanism","[DEBUG] [04:00] Identified 12 hot spots in feed-forward layers","[DEBUG] [05:30] Identified 8 hot spots in layer normalization","[DEBUG] [07:00] Computing strategy fitness scores...","[DEBUG] [08:30] Strategy 1 (Fused attention): Score 94.2","[DEBUG] [10:00] Strategy 2 (Optimized GEMM): Score 91.5","[DEBUG] [11:30] Strategy 3 (Memory coalescing): Score 88.7","[DEBUG] [13:00] Strategy 4 (Kernel fusion): Score 85.3","[DEBUG] [14:30] Strategy 5 (Tensor tiling): Score 82.1","[DEBUG] [15:30] Selecting top 5 strategies for kernel generation...","[INFO] [16:00] Seed strategy generation completed"],"generate-kernels":["[INFO] [00:00] Starting kernel code generation...","[DEBUG] [02:00] Generating Strategy 1: Fused Attention Kernel","[DEBUG] [05:00] - Synthesizing CUDA C++ for multi-head attention","[DEBUG] [08:00] - Generating 4 attention kernel variants","[DEBUG] [12:00] Generating Strategy 2: Optimized GEMM Kernel","[DEBUG] [15:00] - Creating GEMM optimization with Tensor Cores","[DEBUG] [18:00] - Generated 3 GEMM variants for different batch sizes","[DEBUG] [21:00] Generating Strategy 3: Memory Coalescing Kernels","[DEBUG] [24:00] - Implementing memory access patterns","[DEBUG] [26:00] - Generated 2 memory optimization kernels","[DEBUG] [28:00] Generating Strategy 4: Fused LayerNorm Kernel","[DEBUG] [29:00] - Implementing in-place normalization","[DEBUG] [29:30] - Generated 2 LayerNorm fusion variants","[DEBUG] [29:45] Generated 12 kernel variants in total","[DEBUG] [29:50] Total generated code: 18.5MB of CUDA source","[INFO] [30:00] Kernel generation completed"],"kernel-bench":["[INFO] [00:00] Setting up benchmark environment...","[DEBUG] [02:00] Initializing GPU benchmark harness","[DEBUG] [04:00] Loading kernels into GPU memory","[DEBUG] [06:00] Preparing benchmark datasets","[DEBUG] [10:00] Running Kernel 1 benchmarks...","[DEBUG] [12:00] Batch 1 - FPS: 2050, Latency: 0.488ms","[DEBUG] [14:00] Batch 8 - FPS: 1950, Latency: 0.512ms","[DEBUG] [16:00] Running Kernel 2 benchmarks...","[DEBUG] [18:00] Batch 1 - FPS: 2450, Latency: 0.408ms","[DEBUG] [20:00] Batch 8 - FPS: 2350, Latency: 0.426ms","[DEBUG] [22:00] Running Kernel 3 benchmarks...","[DEBUG] [24:00] Batch 1 - FPS: 2680, Latency: 0.373ms","[DEBUG] [26:00] Batch 8 - FPS: 2620, Latency: 0.382ms","[DEBUG] [28:00] Running Kernel 4 benchmarks...","[DEBUG] [30:00] Batch 1 - FPS: 2820, Latency: 0.355ms","[DEBUG] [32:00] Batch 8 - FPS: 2780, Latency: 0.360ms","[DEBUG] [34:00] Benchmark memory footprint analysis...","[DEBUG] [36:00] Kernel 4 shows 18.5% improvement over baseline","[INFO] [38:00] Benchmark simulation completed"],"regenerate-kernels":["[INFO] [00:00] Analyzing benchmark results...","[DEBUG] [02:00] Compiling performance metrics across all kernels","[DEBUG] [04:00] Top performer: Kernel 4 with 24.5% improvement","[DEBUG] [06:00] Secondary performer: Kernel 3 with 18.2% improvement","[DEBUG] [08:00] Identifying optimization opportunities from results","[DEBUG] [10:00] Fine-tuning warp configuration for Kernel 4...","[DEBUG] [12:00] Regenerating kernels with warps=8, blocks=512","[DEBUG] [14:00] Generated Kernel 4a with tile size optimization","[DEBUG] [16:00] Fine-tuning register pressure analysis","[DEBUG] [18:00] Generated 2 refined kernel variants from Kernel 4","[DEBUG] [19:00] Optimizing memory access patterns","[DEBUG] [20:00] Generated 3 memory-optimized variants","[INFO] [22:00] Kernel regeneration completed"],compilation:["[INFO] [00:00] Compiling generated kernels...","[DEBUG] [01:00] NVCC compiler version: 12.2","[DEBUG] [02:00] Compilation started with optimization flags","[DEBUG] [04:00] Compiling fused_attention_kernel_v1.cu...","[DEBUG] [06:00] Compiling fused_attention_kernel_v2.cu...","[DEBUG] [08:00] Compiling optimized_gemm_kernel.cu...","[DEBUG] [09:00] Compiling memory_coalesce_kernel.cu...","[DEBUG] [10:00] Linking object files...","[DEBUG] [11:00] Running ptxas post-compiler optimizations","[DEBUG] [12:00] Successfully compiled 12 kernel objects","[DEBUG] [12:30] Generated binary size: 2.4MB of optimized PTX code","[DEBUG] [13:00] Performing symbol table validation","[DEBUG] [13:30] All 48 kernel functions verified","[INFO] [14:00] Compilation checks passed"],verification:["[INFO] [00:00] Running verification tests...","[DEBUG] [02:00] Loading reference implementations","[DEBUG] [04:00] Executing correctness tests on 10,000 test cases","[DEBUG] [10:00] Batch 1 (1000 cases): ✓ 100% match, max error: 1.2e-5","[DEBUG] [14:00] Batch 2 (2000 cases): ✓ 100% match, max error: 8.7e-6","[DEBUG] [18:00] Batch 3 (3000 cases): ✓ 100% match, max error: 9.3e-6","[DEBUG] [22:00] Batch 4 (4000 cases): ✓ 100% match, max error: 1.1e-5","[DEBUG] [26:00] Running numerics validation","[DEBUG] [28:00] Verifying memory bounds and buffer overrun protection","[DEBUG] [29:00] Thread safety analysis: ✓ All atomic operations correct","[DEBUG] [29:30] Race condition detection: ✓ No conflicts detected","[DEBUG] [30:00] Final validation: 100% test pass rate achieved","[DEBUG] [30:30] All kernels certified for production use","[INFO] [31:00] Verification checks completed"],finalizing:["[INFO] [00:00] Packaging kernels...","[DEBUG] [02:00] Creating kernel library archive","[DEBUG] [04:00] Compressing library.so (2.4MB → 0.8MB)","[DEBUG] [06:00] Generating API documentation","[DEBUG] [08:00] Creating usage examples and tutorials","[DEBUG] [09:00] Finalizing metadata and checksums","[DEBUG] [09:30] Computing SHA256 hashes for all artifacts","[DEBUG] [10:00] Creating manifest file with kernel signatures","[DEBUG] [10:30] Packaging complete: kernel_lib_v1.0.tar.gz","[DEBUG] [11:00] Archive size: 850KB","[INFO] [12:00] Finalization completed"],benchmarking:["[INFO] [00:00] Running final performance benchmarks...","[DEBUG] [02:00] Setting up benchmark environment with 4 different batch sizes","[DEBUG] [05:00] Batch size 1 - Latency: 0.355ms, Throughput: 1410 tokens/sec","[DEBUG] [10:00] Batch size 8 - Latency: 0.380ms per token","[DEBUG] [15:00] Batch size 16 - Latency: 0.312ms per token","[DEBUG] [20:00] Batch size 32 - Latency: 0.295ms per token","[DEBUG] [22:00] Computing memory efficie
1ncy metrics","[DEBUG] [24:00] Peak memory usage: 18.4GB (76.8% of GPU)","[DEBUG] [26:00] Memory bandwidth utilization: 852 GB/s (91% of peak)","[DEBUG] [28:00] Compute utilization: 92.3% (vs baseline 68.4%)","[DEBUG] [30:00] Power efficiency: 5.2 TFLOPS/W (vs baseline 3.1)","[INFO] [33:00] Final benchmarking completed"],"perf-check":["[INFO] [00:00] Analyzing performance improvements...","[DEBUG] [02:00] Collecting baseline metrics from reference implementation","[DEBUG] [04:00] Baseline throughput: 1850 tokens/sec (batch size 8)","[DEBUG] [06:00] Optimized throughput: 2310 tokens/sec (batch size 8)","[DEBUG] [08:00] Throughput improvement: 25% performance gain ✓","[DEBUG] [10:00] Baseline latency: 0.486ms (batch size 1)","[DEBUG] [12:00] Optimized latency: 0.355ms (batch size 1)","[DEBUG] [14:00] Latency improvement: 27% reduction ✓","[DEBUG] [16:00] Memory efficiency improved by 12%","[DEBUG] [18:00] Power consumption reduced by 8%","[DEBUG] [20:00] All performance targets met: ✓","[DEBUG] [22:00] Kernel certification: PASSED","[INFO] [24:00] Performance check completed - Ready to deploy"]},U=(e,t)=>{let r=B(e),n=r.reduce((e,t)=>e+t,0),i="done"===e.status?n:Math.max(0,Math.min(t-e.started_at,n)),a=0,s=G.map((t,n)=>{let s=r[n],o=a,l=i-o,c=D[t.id]||[];if(a+=s,l>=s)return{id:t.id,name:t.name,description:t.description,status:"completed",progress:100,duration:s,logs:c,startTime:e.started_at+o,endTime:e.started_at+o+s};if(l>=0){let r=Math.max(1,Math.min(99,l/s*100)),n=Math.max(1,Math.ceil(r/100*c.length));return{id:t.id,name:t.name,description:t.description,status:"in_progress",progress:r,duration:s,logs:c.slice(0,n),startTime:e.started_at+o}}return{id:t.id,name:t.name,description:t.description,status:"pending",progress:0,duration:s,logs:[]}}),o=s.findIndex(e=>"in_progress"===e.status),l=o>=0?o:s.length-1;return{steps:s,currentStepIndex:l,overallProgress:Math.min(100,i/n*100)}},E=e=>{let{jobData:t}=e,[r,a]=(0,i.useState)(Date.now());(0,i.useEffect)(()=>{if("done"===t.status)return;let e=window.setInterval(()=>{a(Date.now())},750);return()=>window.clearInterval(e)},[t.status]);let{steps:s,currentStepIndex:o,overallProgress:l}=U(t,r),c=e=>{let t=Math.floor(e/1e3%60),r=Math.floor(e/6e4%60),n=Math.floor(e/36e5);return n>0?"".concat(n,"h ").concat(r,"m ").concat(t,"s"):r>0?"".concat(r,"m ").concat(t,"s"):"".concat(t,"s")};return(0,n.jsxs)("div",{className:"mt-6 space-y-4",children:[(0,n.jsxs)("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-4",children:[(0,n.jsxs)("div",{className:"mb-3",children:[(0,n.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,n.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:"done"===t.status?"Kernel Generation Complete":"Kernel Generation Progress"}),(0,n.jsxs)("span",{className:"text-lg font-bold ".concat("done"===t.status?"text-green-600":"text-violet-600"),children:[Math.round(l),"%"]})]}),(0,n.jsx)("div",{className:"w-full h-2 bg-gray-300 rounded-full overflow-hidden",children:(0,n.jsx)("div",{className:"h-full transition-all duration-300 ".concat("done"===t.status?"bg-gradient-to-r from-green-500 to-emerald-500":"bg-gradient-to-r from-violet-500 to-purple-500"),style:{width:"".concat(l,"%")}})})]}),(0,n.jsxs)("div",{className:"text-xs text-gray-600",children:["Step ","done"===t.status?s.length:o+1," of ",s.length]})]}),(0,n.jsx)("div",{className:"space-y-3 max-h-96 overflow-y-auto",children:s.map((e,t)=>(0,n.jsxs)("div",{className:"border rounded p-4 transition-all duration-300 ".concat("completed"===e.status?"border-green-200 bg-green-50":"in_progress"===e.status?"border-violet-300 bg-violet-50":"border-gray-200 bg-white"),children:[(0,n.jsxs)("div",{className:"flex items-start gap-3 mb-2",children:[(0,n.jsxs)("div",{className:"flex-shrink-0 mt-0.5",children:["completed"===e.status&&(0,n.jsx)("div",{className:"w-5 h-5 rounded-full bg-green-500 flex items-center justify-center text-white text-xs font-bold",children:"✓"}),"in_progress"===e.status&&(0,n.jsx)("div",{className:"w-5 h-5 rounded-full border-2 border-violet-500 border-t-violet-200 animate-spin"}),"pending"===e.status&&(0,n.jsx)("div",{className:"w-5 h-5 rounded-full border-2 border-gray-300"})]}),(0,n.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,n.jsx)("h4",{className:"text-sm font-semibold text-gray-900",children:e.name}),(0,n.jsx)("p",{className:"text-xs text-gray-600",children:e.description}),"in_progress"===e.status&&(0,n.jsx)("div",{className:"mt-1 h-1.5 bg-gray-200 rounded-full overflow-hidden",children:(0,n.jsx)("div",{className:"h-full bg-violet-500 transition-all duration-300",style:{width:"".concat(e.progress,"%")}})})]}),(0,n.jsxs)("div",{className:"text-right text-xs font-mono text-gray-600 flex-shrink-0",children:["in_progress"===e.status&&"".concat(Math.round(e.progress),"%"),"completed"===e.status&&c(e.duration),"pending"===e.status&&"-"]})]}),e.logs.length>0&&(0,n.jsx)("div",{className:"mt-2 bg-gray-800 rounded text-gray-300 p-2 font-mono text-xs max-h-20 overflow-auto border border-gray-700",children:e.logs.slice(-3).map((e,t)=>(0,n.jsx)("div",{className:"text-gray-400 truncate",children:e},t))})]},e.id))})]})};function z(){let{user:e}=(0,x.a)(),[t,r]=(0,i.useState)(!1),a=!!((null==e?void 0:e.developerId)&&j.includes(e.developerId)),[_,G]=(0,i.useState)(!1),[B,D]=(0,i.useState)(""),[U,z]=(0,i.useState)(""),[M,S]=(0,i.useState)(!1),[C,L]=(0,i.useState)([]),[P,I]=(0,i.useState)(!1),[F,O]=(0,i.useState)(!1),[A,R]=(0,i.useState)(null),[K,T]=(0,i.useState)(0),[Z,V]=(0,i.useState)(!1),[H,W]=(0,i.useState)("");(0,i.useEffect)(()=>{_&&(async()=>{I(!0);try{try{let e=await (0,h.zp)();T(e)}catch(e){console.error("Failed to fetch kernel price",e)}let e=await (0,f.a9)();if(e){let t=Object.values(e).flatMap(e=>e.instances||[]).filter(e=>e.gpu_id).map(e=>{var t;return{gpu_id:e.gpu_id,chip_id:e.chip_id,gpu_name:e.name,regions:"str
1ing"==typeof e.regions?[e.regions]:e.regions||[],price_per_second:e.price_per_hour?e.price_per_hour/3600:0,logo_url:void 0,memory_in_gb:(null===(t=e.VRAM)||void 0===t?void 0:t.size_in_gigabytes)||0}});L(t),t.length>0&&!U&&z(t[0].gpu_id)}}catch(e){console.error("Failed to fetch GPUs:",e)}finally{I(!1)}})()},[_]);let[X,q]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if(!B){q(!1),R(null),O(!1),V(!1);return}let e=setTimeout(async()=>{O(!0),R(null),V(!1);try{let e=await (0,h.HO)(B);e.is_valid?(q(!0),R(null),V(!!e.is_private)):(q(!1),R("Invalid Huggingface URL"))}catch(e){q(!1),R("Validation failed")}finally{O(!1)}},800);return()=>clearTimeout(e)},[B]),(0,i.useEffect)(()=>{if(B&&U&&0!==C.length)try{let e=C.find(e=>e.gpu_id===U);if(!e)return;let t=(0,h.Ce)(B,e.gpu_id,e.gpu_name,e.memory_in_gb||24,e.price_per_second?3600*e.price_per_second:.5);T(t)}catch(e){console.error("Failed to calculate dynamic pricing:",e)}},[B,U,C]);let[J,$]=(0,i.useState)({}),[Q,Y]=(0,i.useState)(!1),[ee,et]=(0,i.useState)(null),[er,en]=(0,i.useState)("grid");(0,i.useEffect)(()=>{try{let e=window.localStorage.getItem(b);if(!e){Y(!0);return}let t=JSON.parse(e);t&&"object"==typeof t&&$(t)}catch(e){console.error("Failed to restore demo kernel jobs:",e)}finally{Y(!0)}},[]),(0,i.useEffect)(()=>{Q&&window.localStorage.setItem(b,JSON.stringify(J))},[J,Q]),(0,i.useEffect)(()=>{if(!Object.values(J).some(e=>"running"===e.status))return;let e=window.setInterval(()=>{let e=Date.now();$(t=>{let r=!1,n={...t};return Object.entries(n).forEach(t=>{let[i,a]=t;if("running"!==a.status)return;let s=N(a);e-a.started_at>=s&&(r=!0,n[i]={...a,status:"done",completed_at:e,results:w(),logs:["Kernel generation completed successfully."]})}),r?n:t})},1e3);return()=>window.clearInterval(e)},[J]);let ei=async()=>{if(!B){R("Please enter a URL");return}if(!U){alert("Please select a GPU.");return}let e=C.find(e=>e.gpu_id===U),t="".concat(B,"-").concat(Date.now()),r=k(),n={status:"running",logs:["Kernel generation started."],demo:!0,job_id:t,model_id:B,gpu_id:U,gpu_name:(null==e?void 0:e.gpu_name)||U,started_at:Date.now(),step_durations:r};$(e=>({[t]:n,...e})),G(!1),D(""),W(""),V(!1),q(!1)},ea=(e,t,r)=>{var i,a;return(0,n.jsx)("button",{type:"button",onClick:()=>{"done"===t.status&&et(e)},className:"w-full bg-white rounded-lg shadow-sm border border-gray-200 p-5 text-left transition-all ".concat(r?"flex min-h-[190px] flex-col":""," ").concat("done"===t.status?"hover:border-violet-300 hover:shadow-md":"cursor-default"),children:(0,n.jsxs)("div",{className:"flex gap-4 ".concat(r?"h-full flex-col":"flex-col md:flex-row md:items-center md:justify-between"),children:[(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("h3",{className:"text-sm font-semibold text-gray-900 truncate",children:t.model_id}),(0,n.jsxs)("div",{className:"mt-2 flex flex-wrap gap-x-5 gap-y-1 text-xs text-gray-500",children:[(0,n.jsxs)("span",{children:["GPU: ",y(t.gpu_name)]}),(0,n.jsx)("span",{children:"Base serving library: vLLM"}),(null===(i=t.results)||void 0===i?void 0:i.estimated_speedup)&&(0,n.jsxs)("span",{children:["Performance: ",t.results.estimated_speedup.split(" ")[0]]}),(null===(a=t.results)||void 0===a?void 0:a.latency_reduction)&&(0,n.jsxs)("span",{children:["Latency reduction: ",t.results.latency_reduction]})]})]}),(0,n.jsxs)("div",{className:"flex items-center gap-3 ".concat(r?"mt-auto justify-between":""),children:[(0,n.jsx)("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium ".concat("done"===t.status?"bg-green-100 text-green-800":"bg-blue-100 text-blue-800"),children:"done"===t.status?"SUCCESS":"RUNNING"}),"done"===t.status&&(0,n.jsx)("span",{className:"text-xs font-medium text-violet-600",children:"View details"})]})]})},e)};return(0,n.jsx)(o.i,{children:(0,n.jsxs)(l.Z,{className:"bg-gradient-to-b from-[#f8f8fc] to-[#f1effa]",children:[(0,n.jsx)(s(),{children:(0,n.jsx)("title",{children:"Kernels | Dashboard"})}),(0,n.jsxs)("div",{className:"mx-auto w-full max-w-[1400px] px-4 py-6 sm:px-6 lg:px-11 lg:pb-12 lg:pt-9",children:[(0,n.jsxs)("div",{className:"mb-8 flex flex-col md:flex-row md:items-center justify-between gap-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("h1",{className:"text-xl font-bold text-gray-900 flex items-center",children:[(0,n.jsx)("span",{className:"inline-flex items-center justify-center h-8 w-8 rounded-md bg-gradient-to-r from-violet-500 to-indigo-600 text-white mr-2",children:(0,n.jsx)(c.Z,{className:"h-5 w-5"})}),"Kernels"]}),(0,n.jsx)("p",{className:"text-sm text-gray-600 mt-2",children:"Manage and monitor your kernels here."})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[a&&(0,n.jsxs)("button",{type:"button",onClick:()=>r(e=>!e),"aria-pressed":t,className:"inline-flex items-center justify-center gap-3 rounded-md px-4 py-2 text-sm font-medium text-gray-700 transition-colors hover:text-gray-900",children:[(0,n.jsx)("span",{children:"Test Mode"}),(0,n.jsx)("span",{className:"relative inline-flex h-5 w-9 items-center rounded-full transition-colors ".concat(t?"bg-violet-600":"bg-gray-300"),children:(0,n.jsx)("span",{className:"inline-block h-4 w-4 roun
1ded-full bg-white shadow transition-transform ".concat(t?"translate-x-4":"translate-x-0.5")})})]}),(0,n.jsxs)("button",{onClick:()=>G(!0),className:"inline-flex items-center justify-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-violet-600 hover:bg-violet-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-violet-500 transition-colors",children:[(0,n.jsx)(d.Z,{className:"h-4 w-4 mr-2"}),"Generate Kernel"]})]})]}),0===Object.keys(J).length&&(0,n.jsxs)("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200 p-8 text-center text-gray-500",children:[(0,n.jsx)(c.Z,{className:"h-12 w-12 mx-auto mb-4 text-gray-300"}),(0,n.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"No Kernels Found"}),(0,n.jsx)("p",{className:"mt-1",children:"Get started by creating your first kernel."})]}),Object.keys(J).length>0&&(0,n.jsxs)("div",{className:"mt-8",children:[(0,n.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,n.jsx)("h2",{className:"text-lg font-medium text-gray-900",children:"Generated Kernels"}),(0,n.jsxs)("div",{className:"inline-flex w-fit items-center p-1 bg-gray-100 rounded-lg",children:[(0,n.jsx)("button",{type:"button",onClick:()=>en("grid"),"aria-label":"Grid view",title:"Grid view",className:"p-1.5 rounded-md transition-all ".concat("grid"===er?"bg-white shadow text-violet-600":"text-gray-500 hover:text-gray-900"),children:(0,n.jsx)(u.Z,{size:18})}),(0,n.jsx)("button",{type:"button",onClick:()=>en("list"),"aria-label":"List view",title:"List view",className:"p-1.5 rounded-md transition-all ".concat("list"===er?"bg-white shadow text-violet-600":"text-gray-500 hover:text-gray-900"),children:(0,n.jsx)(p.Z,{size:18})})]})]}),(0,n.jsx)("div",{className:"grid"===er?"grid grid-cols-1 gap-4 lg:grid-cols-2 xl:grid-cols-3":"space-y-4",children:Object.entries(J).map(e=>{let[t,r]=e;return ea(t,r,"grid"===er)})}),Object.entries(J).some(e=>{let[,t]=e;return"running"===t.status})&&(0,n.jsxs)("div",{className:"mt-6 space-y-4",children:[(0,n.jsx)("h3",{className:"text-sm font-semibold text-gray-900",children:"Generation Progress"}),Object.entries(J).filter(e=>{let[,t]=e;return"running"===t.status}).map(e=>{let[t,r]=e;return(0,n.jsxs)("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200 p-6",children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:r.model_id}),(0,n.jsxs)("p",{className:"mt-1 text-xs text-gray-500",children:["GPU: ",y(r.gpu_name)," \xb7 Base serving library: vLLM"]})]}),(0,n.jsx)(E,{jobData:r})]},t)})]})]})]}),ee&&J[ee]&&(0,n.jsx)(g.Z,{isOpen:!0,onClose:()=>et(null),title:"Generated Kernel Details",maxWidth:"max-w-5xl",children:(()=>{let e=J[ee];return(0,n.jsxs)("div",{className:"space-y-6",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-start md:justify-between",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"text-sm font-semibold text-gray-900",children:e.model_id}),(0,n.jsxs)("p",{className:"mt-1 text-xs text-gray-500",children:["GPU: ",y(e.gpu_name)]}),(0,n.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:"Base serving library: vLLM"})]}),(0,n.jsx)("span",{className:"w-fit inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800",children:"SUCCESS"})]}),(0,n.jsx)(E,{jobData:e}),e.results&&(0,n.jsxs)("div",{className:"pt-4 border-t border-gray-200",children:[(0,n.jsx)("h4",{className:"text-sm font-medium text-gray-900 mb-3",children:"Generated Kernel Summary"}),(0,n.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,n.jsxs)("div",{className:"bg-gradient-to-br from-violet-50 to-indigo-50 border border-violet-100 rounded-lg p-4",children:[(0,n.jsx)("p",{className:"text-xs text-violet-600 font-medium uppercase tracking-wider mb-1",children:"Performance Achieved"}),(0,n.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,n.jsx)("span",{className:"text-2xl font-bold text-violet-700",children:e.results.estimated_speedup.split(" ")[0]}),(0,n.jsx)("span",{className:"text-xs text-violet-500",children:"Theoretical"})]})]}),(0,n.jsxs)("div",{className:"bg-gradient-to-br from-blue-50 to-sky-50 border border-blue-100 rounded-lg p-4",children:[(0,n.jsx)("p",{className:"text-xs text-blue-600 font-medium uppercase tracking-wider mb-1",children:"Base Serving Library"}),(0,n.jsx)("span",{className:"text-2xl font-bold text-blue-700",children:"vLLM"})]}),(0,n.jsxs)("div",{className:"bg-gradient-to-br from-emerald-50 to-green-50 border border-emerald-100 rounded-lg p-4",children:[(0,n.jsx)("p",{className:"text-xs text-emerald-600 font-medium uppercase tracking-wider mb-1",children:"Latency Reduction"}),(0,n.jsx)("span",{className:"text-2xl font-bold text-emerald-700",children:e.results.latency_reduction})]})]})]})]})})()}),(0,n.jsx)(g.Z,{isOpen:_,onClose:()=>G(!1),title:"Generate Optimized Kernel",maxWidth:"max-w-xl",children:(0,n.jsxs)("div",{className:"space-y-6 py-2",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Huggingface Url"}),(0,n.jsxs)("div",{className:"relative rounded-md shadow-sm",children:[(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,n.jsx)(m.Z,{className:"h-4 w-4 text-gray-400"})}),(0,n.jsx)("input",{type:"text",value:B,onChange:e=>D(e.target.value),className:"focus:ring-violet-500 focus:border-violet-500 block w-full pl-10 pr-10 sm:text-sm border-gray-300 rounded-md py-2 border ".concat(A?"border-red-500":X?"border-green-500":""),placeholder:"https://huggingface.co/..."})]}),(0,n.jsx)("div",{className:"absolute inset-y-0 right-0 pr-3 flex items-center justify-center pointer-events-none",children:F?(0,n.jsxs)("svg",{className:"animate-spin h-5 w-5 text-violet-600",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,n.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,n.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):X?Z?(0,n.jsx)("svg",{className:"h-6 w-6 text-yellow-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})}):(0,n.jsx)("svg",{className:"h-6 w-6 text-green-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"})}):A?(0,n.jsx)("svg",{className:"h-6 w-6 text-red-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})}):null})]}),A&&(0,n.jsx)("p",{className:"mt-1 text-sm text-red-600",children:A}),X&&Z&&(0,n.jsxs)("div",{className:"mt-3 animate-in fade-in slide-in-from-top-1 duration-200",children:[(0,n.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:["API Key ",(0,n.jsx)("span",{className:"text-gray-500 font-normal",children:"(Required for private models)"})]}),(0,n.jsxs)("div",{className:"relative rounded-md shadow-sm",children:[(0,n.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,n.jsx)("svg",{className:"h-4 w-4 text-gray-400",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,n.jsx)("path",{d:"M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"})})}),(0,n.jsx)("input",{type:"password",value:H,onChange:e=>W(e.target.value),className:"focus:ring-violet-500 focus:border-violet-500 block w-full pl-10 sm:text-sm border-gray-300 rounded-md py-2 border",placeholder:"hf_..."})]}),(0,n.jsxs)("p",{className:"mt-1 text-sm text-yellow-600 flex items-center",children:[(0,n.jsx)("svg",{className:"h-4 w-4 mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})}),"Private or Gated Model Detected"]})]})]}),(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Select GPU"}),P?(0,n.jsxs)("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:[(0,n.jsx)("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-violet-600"}),"Loading GPUs..."]}):(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsxs)("button",{type:"button",onClick:()=>S(!M),className:"relative w-full bg-white border border-gray-300 rounded-md shadow-sm pl-3 pr-10 py-2 text-left cursor-default focus:outline-none focus:ring-1 focus:ring-violet-500 focus:border-violet-500 sm:text-sm",children:[(0,n.jsx)("span",{className:"flex items-center",children:(()=>{let e=C.find(e=>e.gpu_id===U);return e?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("img",{src:e.logo_url||v,alt:"",width:24,height:24,className:"flex-shrink-0 h-6 w-6 object-contain mr-3"}),(0,n.jsx)("span",{className:"block truncate",children:y(e.gpu_name)})]}):(0,n.jsx)("span",{className:"block truncate text-gray-500",children:"Select a GPU"})})()}),(0,n.jsx)("span",{className:"absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none",children:(0,n.jsx)("svg",{className:"h-5 w-5 text-gray-400",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:(0,n.jsx)("path",{fillRule:"evenodd",d:"M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),M&&(0,n.jsx)("div",{className:"absolute z-10 mt-1 w-full bg-white shadow-lg max-h-56 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm",children:C.map(e=>(0,n.jsxs)("div",{className:"cursor-default select-none relative py-2 pl-3 pr-9 hover:bg-violet-50 ".concat(e.gpu_id===U?"text-violet-900 bg-vi
1olet-50":"text-gray-900"),onClick:()=>{z(e.gpu_id),S(!1)},children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("img",{src:e.logo_url||v,alt:"",width:24,height:24,className:"flex-shrink-0 h-6 w-6 object-contain mr-3"}),(0,n.jsx)("span",{className:"block truncate ".concat(e.gpu_id===U?"font-semibold":"font-normal"),children:y(e.gpu_name)})]}),e.gpu_id===U&&(0,n.jsx)("span",{className:"absolute inset-y-0 right-0 flex items-center pr-4 text-violet-600",children:(0,n.jsx)("svg",{className:"h-5 w-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:(0,n.jsx)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})})]},e.gpu_id))})]})]}),(0,n.jsxs)("div",{className:"bg-gray-50 p-4 rounded-md flex justify-between items-center border border-gray-200",children:[(0,n.jsx)("span",{className:"text-sm font-medium text-gray-500",children:"Estimated Pricing"}),(0,n.jsxs)("span",{className:"text-lg font-bold text-gray-900",children:["$",(null!=K?K:0).toFixed(2)," "]})]}),(0,n.jsxs)("div",{className:"flex justify-end pt-4",children:[(0,n.jsx)("button",{onClick:()=>G(!1),className:"mr-3 bg-white py-2 px-4 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-violet-500",children:"Cancel"}),(0,n.jsx)("button",{onClick:ei,disabled:!X||F||!U,className:"inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-violet-600 hover:bg-violet-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-violet-500 disabled:opacity-50 disabled:cursor-not-allowed",children:"Generate"})]})]})})]})})}},11740:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});var n=(0,r(40885).Z)("outline","bell","IconBell",[["path",{d:"M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6",key:"svg-0"}],["path",{d:"M9 17v1a3 3 0 0 0 6 0v-1",key:"svg-1"}]])},52956:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});var n=(0,r(40885).Z)("outline","brand-github","IconBrandGithub",[["path",{d:"M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5",key:"svg-0"}]])},10090:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});var n=(0,r(40885).Z)("outline","check","IconCheck",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]])},3794:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});var n=(0,r(40885).Z)("outline","clock","IconClock",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 7v5l3 3",key:"svg-1"}]])},68001:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});var n=(0,r(40885).Z)("outline","code","IconCode",[["path",{d:"M7 8l-4 4l4 4",key:"svg-0"}],["path",{d:"M17 8l4 4l-4 4",key:"svg-1"}],["path",{d:"M14 4l-4 16",key:"svg-2"}]])}},function(e){e.O(0,[1664,5675,8384,3437,94,954,3203,4977,2341,2888,9774,179],function(){return e(e.s=70850)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.