id int64 0 755k | file_name stringlengths 3 109 | file_path stringlengths 13 185 | content stringlengths 31 9.38M | size int64 31 9.38M | language stringclasses 1
value | extension stringclasses 11
values | total_lines int64 1 340k | avg_line_length float64 2.18 149k | max_line_length int64 7 2.22M | alphanum_fraction float64 0 1 | repo_name stringlengths 6 65 | repo_stars int64 100 47.3k | repo_forks int64 0 12k | repo_open_issues int64 0 3.4k | repo_license stringclasses 9
values | repo_extraction_date stringclasses 92
values | exact_duplicates_redpajama bool 2
classes | near_duplicates_redpajama bool 2
classes | exact_duplicates_githubcode bool 2
classes | exact_duplicates_stackv2 bool 1
class | exact_duplicates_stackv1 bool 2
classes | near_duplicates_githubcode bool 2
classes | near_duplicates_stackv1 bool 2
classes | near_duplicates_stackv2 bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
18,504 | util-unix.cpp | AGWA_git-crypt/util-unix.cpp | /*
* Copyright 2012, 2014 Andrew Ayer
*
* This file is part of git-crypt.
*
* git-crypt is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later ... | 5,682 | C++ | .cpp | 197 | 26.614213 | 86 | 0.680205 | AGWA/git-crypt | 8,224 | 478 | 134 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
18,505 | crypto-openssl-11.cpp | AGWA_git-crypt/crypto-openssl-11.cpp | /*
* Copyright 2012, 2014 Andrew Ayer
*
* This file is part of git-crypt.
*
* git-crypt is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later ... | 3,312 | C++ | .cpp | 101 | 30.980198 | 91 | 0.736298 | AGWA/git-crypt | 8,224 | 478 | 134 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
18,506 | commands.cpp | AGWA_git-crypt/commands.cpp | /*
* Copyright 2012, 2014 Andrew Ayer
*
* This file is part of git-crypt.
*
* git-crypt is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later ... | 58,290 | C++ | .cpp | 1,476 | 36.836721 | 219 | 0.662967 | AGWA/git-crypt | 8,224 | 478 | 134 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | true | false | false |
18,507 | fhstream.cpp | AGWA_git-crypt/fhstream.cpp | /*
* Copyright (C) 2012, 2015 Andrew Ayer
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, p... | 6,313 | C++ | .cpp | 187 | 31.368984 | 90 | 0.704239 | AGWA/git-crypt | 8,224 | 478 | 134 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
18,508 | coprocess-win32.cpp | AGWA_git-crypt/coprocess-win32.cpp | /*
* Copyright 2015 Andrew Ayer
*
* This file is part of git-crypt.
*
* git-crypt is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later versio... | 8,080 | C++ | .cpp | 235 | 31.842553 | 134 | 0.722059 | AGWA/git-crypt | 8,224 | 478 | 134 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
18,509 | util-win32.cpp | AGWA_git-crypt/util-win32.cpp | /*
* Copyright 2014 Andrew Ayer
*
* This file is part of git-crypt.
*
* git-crypt is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later versio... | 5,696 | C++ | .cpp | 188 | 28.031915 | 119 | 0.699854 | AGWA/git-crypt | 8,224 | 478 | 134 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
18,510 | gpg.cpp | AGWA_git-crypt/gpg.cpp | /*
* Copyright 2014 Andrew Ayer
*
* This file is part of git-crypt.
*
* git-crypt is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later versio... | 6,112 | C++ | .cpp | 171 | 33.327485 | 144 | 0.70777 | AGWA/git-crypt | 8,224 | 478 | 134 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | true | false | false |
18,511 | git-crypt.cpp | AGWA_git-crypt/git-crypt.cpp | /*
* Copyright 2012, 2014 Andrew Ayer
*
* This file is part of git-crypt.
*
* git-crypt is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later ... | 8,505 | C++ | .cpp | 246 | 32.162602 | 117 | 0.633572 | AGWA/git-crypt | 8,224 | 478 | 134 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
18,512 | crypto.cpp | AGWA_git-crypt/crypto.cpp | /*
* Copyright 2012, 2014 Andrew Ayer
*
* This file is part of git-crypt.
*
* git-crypt is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later ... | 2,807 | C++ | .cpp | 71 | 37.380282 | 130 | 0.733309 | AGWA/git-crypt | 8,224 | 478 | 134 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
18,513 | parse_options.cpp | AGWA_git-crypt/parse_options.cpp | /*
* Copyright 2014 Andrew Ayer
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, di... | 3,352 | C++ | .cpp | 107 | 27.542056 | 91 | 0.654001 | AGWA/git-crypt | 8,224 | 478 | 134 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
18,514 | coprocess-win32.hpp | AGWA_git-crypt/coprocess-win32.hpp | /*
* Copyright 2015 Andrew Ayer
*
* This file is part of git-crypt.
*
* git-crypt is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later versio... | 2,094 | C++ | .h | 57 | 34.614035 | 72 | 0.751234 | AGWA/git-crypt | 8,224 | 478 | 134 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
18,515 | crypto.hpp | AGWA_git-crypt/crypto.hpp | /*
* Copyright 2012, 2014 Andrew Ayer
*
* This file is part of git-crypt.
*
* git-crypt is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later ... | 3,241 | C++ | .h | 95 | 32.115789 | 120 | 0.743598 | AGWA/git-crypt | 8,224 | 478 | 134 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
18,516 | fhstream.hpp | AGWA_git-crypt/fhstream.hpp | /*
* Copyright (C) 2012, 2015 Andrew Ayer
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, p... | 3,855 | C++ | .h | 115 | 31.556522 | 113 | 0.719699 | AGWA/git-crypt | 8,224 | 478 | 134 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
18,517 | commands.hpp | AGWA_git-crypt/commands.hpp | /*
* Copyright 2012, 2014 Andrew Ayer
*
* This file is part of git-crypt.
*
* git-crypt is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later ... | 2,626 | C++ | .h | 68 | 37.058824 | 72 | 0.741176 | AGWA/git-crypt | 8,224 | 478 | 134 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
18,518 | git-crypt.hpp | AGWA_git-crypt/git-crypt.hpp | /*
* Copyright 2014 Andrew Ayer
*
* This file is part of git-crypt.
*
* git-crypt is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later versio... | 1,451 | C++ | .h | 34 | 40.735294 | 72 | 0.763623 | AGWA/git-crypt | 8,224 | 478 | 134 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | true | false | false |
18,519 | gpg.hpp | AGWA_git-crypt/gpg.hpp | /*
* Copyright 2014 Andrew Ayer
*
* This file is part of git-crypt.
*
* git-crypt is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later versio... | 1,910 | C++ | .h | 44 | 41.590909 | 148 | 0.754839 | AGWA/git-crypt | 8,224 | 478 | 134 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | true | false | false |
18,520 | key.hpp | AGWA_git-crypt/key.hpp | /*
* Copyright 2014 Andrew Ayer
*
* This file is part of git-crypt.
*
* git-crypt is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later versio... | 3,096 | C++ | .h | 94 | 30.734043 | 88 | 0.705369 | AGWA/git-crypt | 8,224 | 478 | 134 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
18,521 | parse_options.hpp | AGWA_git-crypt/parse_options.hpp | /*
* Copyright 2014 Andrew Ayer
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, di... | 2,091 | C++ | .h | 48 | 41.625 | 91 | 0.752212 | AGWA/git-crypt | 8,224 | 478 | 134 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
18,522 | coprocess-unix.hpp | AGWA_git-crypt/coprocess-unix.hpp | /*
* Copyright 2015 Andrew Ayer
*
* This file is part of git-crypt.
*
* git-crypt is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later versio... | 2,072 | C++ | .h | 57 | 34.22807 | 72 | 0.748503 | AGWA/git-crypt | 8,224 | 478 | 134 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
18,523 | util.hpp | AGWA_git-crypt/util.hpp | /*
* Copyright 2012, 2014 Andrew Ayer
*
* This file is part of git-crypt.
*
* git-crypt is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later ... | 3,225 | C++ | .h | 73 | 42.534247 | 107 | 0.738065 | AGWA/git-crypt | 8,224 | 478 | 134 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
18,525 | testUtils.cpp | Const-me_Whisper/Tools/compareTraces/testUtils.cpp | #include "stdafx.h"
#include "../../Whisper/ML/testUtils.h"
#include <immintrin.h>
using namespace DirectCompute;
namespace
{
using DirectCompute::sTensorDiff;
__forceinline __m256 load( const float* rsi )
{
return _mm256_loadu_ps( rsi );
}
__forceinline __m256 load( const uint16_t* rsi )
{
const __m128i i... | 5,976 | C++ | .cpp | 202 | 26.450495 | 109 | 0.598992 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,526 | TraceReader.cpp | Const-me_Whisper/Tools/compareTraces/TraceReader.cpp | #include "stdafx.h"
#include "TraceReader.h"
using namespace Tracing;
const sTraceItem& TraceReader::operator[]( size_t idx ) const
{
if( idx >= countItems )
throw E_BOUNDS;
return items[ idx ];
}
CStringA TraceReader::getName( const sTraceItem& item ) const
{
const size_t idx = item.stringIndex;
if( idx >= cou... | 1,192 | C++ | .cpp | 38 | 29.421053 | 110 | 0.72973 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,527 | stdafx.cpp | Const-me_Whisper/Tools/compareTraces/stdafx.cpp | #include "stdafx.h"
namespace
{
wchar_t* formatMessage( HRESULT hr )
{
wchar_t* err;
if( FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
hr,
MAKELANGID( LANG_NEUTRAL, SUBLANG_DEFAULT ),
(LPTSTR)&err,
0,
NULL ) )
return err;
return nullptr;
}
}
void print... | 541 | C++ | .cpp | 28 | 16.821429 | 81 | 0.666016 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,528 | CommandLineArgs.cpp | Const-me_Whisper/Tools/compareTraces/CommandLineArgs.cpp | #include "stdafx.h"
#include "CommandLineArgs.h"
#include <charconv>
static bool printUsage()
{
fprintf( stderr, "Usage: compareTraces.exe trace1.bin trace2.bin [-diff N]\n" );
return false;
}
bool CommandLineArgs::parse( int argc, wchar_t* argv[] )
{
size_t idx = 0;
CString sw;
CStringA tmp;
for( int i = 1; i ... | 964 | C++ | .cpp | 47 | 17.553191 | 81 | 0.592998 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,529 | compare.cpp | Const-me_Whisper/Tools/compareTraces/compare.cpp | #include "stdafx.h"
#include "../../Whisper/API/iContext.cl.h"
#include "TraceReader.h"
#include "../../Whisper/ML/testUtils.h"
#include "compare.h"
using namespace Tracing;
using namespace DirectCompute;
namespace
{
inline const char* cstr( eItemType it )
{
switch( it )
{
case eItemType::Buffer: return "Buffe... | 10,262 | C++ | .cpp | 326 | 27.935583 | 147 | 0.609759 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,530 | compareTraces.cpp | Const-me_Whisper/Tools/compareTraces/compareTraces.cpp | #include "stdafx.h"
#include <stdio.h>
#include "compare.h"
#include "CommandLineArgs.h"
int wmain( int argc, wchar_t* argv[] )
{
CommandLineArgs cla;
if( !cla.parse( argc, argv ) )
return 1;
HRESULT hr = compareTraces( cla );
if( SUCCEEDED( hr ) )
return 0;
return hr;
} | 282 | C++ | .cpp | 14 | 18.428571 | 38 | 0.696629 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,531 | modelFactory.cpp | Const-me_Whisper/Whisper/modelFactory.cpp | #include "stdafx.h"
#include "modelFactory.h"
#include "API/iContext.cl.h"
HRESULT COMLIGHTCALL Whisper::loadModel( const wchar_t* path, const sModelSetup& setup, const sLoadModelCallbacks* callbacks, iModel** pp )
{
switch( setup.impl )
{
case eModelImplementation::GPU:
case eModelImplementation::Hybrid:
return... | 666 | C++ | .cpp | 18 | 34.722222 | 139 | 0.76947 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,532 | DllMain.cpp | Const-me_Whisper/Whisper/DllMain.cpp | #include "stdafx.h"
BOOL __stdcall DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved )
{
// Perform actions based on the reason for calling.
switch( fdwReason )
{
case DLL_PROCESS_ATTACH:
// Initialize once for each new process. Return FALSE to fail DLL load.
DisableThreadLibraryCalls( (HMODULE)... | 707 | C++ | .cpp | 26 | 24.807692 | 81 | 0.748899 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | true | false |
18,533 | whisperCom.cpp | Const-me_Whisper/Whisper/whisperCom.cpp | #include "stdafx.h"
#include "ML/Tensor.h"
#include "API/iMediaFoundation.cl.h"
#include "API/iContext.cl.h"
#include "API/sFullParams.h"
#include "Utils/ReadStream.h"
#include "ML/testUtils.h"
#include "Utils/Trace/tracing.h"
#include "modelFactory.h"
#if BUILD_BOTH_VERSIONS
#ifndef __AVX__
#error Reference version re... | 38,934 | C++ | .cpp | 882 | 40.086168 | 162 | 0.643697 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,534 | shaders.cpp | Const-me_Whisper/Whisper/D3D/shaders.cpp | #include "stdafx.h"
#include "shaders.h"
#include "device.h"
#include "../Utils/LZ4/lz4.h"
namespace
{
#ifdef _DEBUG
#include "shaderData-Debug.inl"
#else
#include "shaderData-Release.inl"
#endif
// static std::vector<CComPtr<ID3D11ComputeShader>> s_shaders;
}
HRESULT DirectCompute::createComputeShaders( std::vecto... | 1,940 | C++ | .cpp | 53 | 34.377358 | 166 | 0.733369 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,535 | Binder.cpp | Const-me_Whisper/Whisper/D3D/Binder.cpp | #include "stdafx.h"
#include "Binder.h"
#include <algorithm>
using namespace DirectCompute;
void Binder::bind( ID3D11ShaderResourceView* srv0, ID3D11UnorderedAccessView* uav0 )
{
ID3D11DeviceContext* const ctx = context();
ctx->CSSetUnorderedAccessViews( 0, 1, &uav0, nullptr );
ctx->CSSetShaderResources( 0, 1, &sr... | 2,225 | C++ | .cpp | 50 | 42.64 | 130 | 0.738326 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,536 | createBuffer.cpp | Const-me_Whisper/Whisper/D3D/createBuffer.cpp | #include "stdafx.h"
#include "createBuffer.h"
#define CHECK( hr ) { const HRESULT __hr = ( hr ); if( FAILED( __hr ) ) return __hr; }
HRESULT DirectCompute::createBuffer( eBufferUse use, size_t totalBytes, ID3D11Buffer** ppGpuBuffer, const void* rsi, ID3D11Buffer** ppStagingBuffer, bool shared )
{
if( totalBytes > IN... | 2,150 | C++ | .cpp | 56 | 35.696429 | 162 | 0.744732 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,537 | listGPUs.cpp | Const-me_Whisper/Whisper/D3D/listGPUs.cpp | #include "stdafx.h"
#include "listGPUs.h"
#pragma comment(lib, "DXGI.lib")
#include <charconv>
#include <optional>
namespace DirectCompute
{
static HRESULT createFactory( CComPtr<IDXGIFactory1>& rdi )
{
HRESULT hr = CreateDXGIFactory1( IID_PPV_ARGS( &rdi ) );
if( SUCCEEDED( hr ) )
return S_OK;
return hr;
}... | 3,245 | C++ | .cpp | 121 | 23.578512 | 86 | 0.665378 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,538 | createDevice.cpp | Const-me_Whisper/Whisper/D3D/createDevice.cpp | #include "stdafx.h"
#include "createDevice.h"
#include "listGPUs.h"
#include "RenderDoc/renderDoc.h"
#pragma comment(lib, "D3D11.lib")
#include <atlstr.h>
HRESULT DirectCompute::createDevice( const std::wstring& adapterName, ID3D11Device** dev, ID3D11DeviceContext** context )
{
CComPtr<IDXGIAdapter1> adapter = select... | 5,133 | C++ | .cpp | 126 | 38.484127 | 151 | 0.742084 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,539 | downloadBuffer.cpp | Const-me_Whisper/Whisper/D3D/downloadBuffer.cpp | #include "stdafx.h"
#include "downloadBuffer.h"
#include "device.h"
#include "MappedResource.h"
namespace
{
struct BufferInfo
{
D3D11_SHADER_RESOURCE_VIEW_DESC viewDesc;
D3D11_BUFFER_DESC bufferDesc;
CComPtr<ID3D11Buffer> source;
HRESULT create( ID3D11ShaderResourceView* srv )
{
srv->GetDesc( &viewDesc... | 1,777 | C++ | .cpp | 60 | 26.733333 | 108 | 0.732708 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,540 | enums.cpp | Const-me_Whisper/Whisper/D3D/enums.cpp | #include "stdafx.h"
#include "enums.h"
static const alignas( 16 ) std::array<DXGI_FORMAT, 3> s_tensorViewFormats = { DXGI_FORMAT_R16_FLOAT, DXGI_FORMAT_R32_FLOAT, DXGI_FORMAT_R32_UINT };
DXGI_FORMAT DirectCompute::viewFormat( eDataType dt )
{
return s_tensorViewFormats[ (uint8_t)dt ];
} | 290 | C++ | .cpp | 7 | 40.142857 | 147 | 0.755319 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,541 | MappedResource.cpp | Const-me_Whisper/Whisper/D3D/MappedResource.cpp | #include "stdafx.h"
#include "MappedResource.h"
using namespace DirectCompute;
#define CHECK( hr ) { const HRESULT __hr = ( hr ); if( FAILED( __hr ) ) return __hr; }
MappedResource::MappedResource()
{
mapped.pData = nullptr;
mapped.RowPitch = mapped.DepthPitch = 0;
resource = nullptr;
}
HRESULT MappedResource::map... | 761 | C++ | .cpp | 30 | 23.5 | 86 | 0.702332 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,542 | shaderNames.cpp | Const-me_Whisper/Whisper/D3D/shaderNames.cpp | // This source file is generated by a tool
#include "stdafx.h"
#include "shaderNames.h"
static const std::array<const char*, 41> s_shaderNames =
{
"add",
"addInPlace",
"addRepeat",
"addRepeatEx",
"addRepeatGelu",
"addRepeatScale",
"addRows",
"convolutionMain",
"convolutionMain2",
"convolutionMain2Fixed",
"... | 1,061 | C++ | .cpp | 54 | 17.759259 | 65 | 0.752485 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,543 | renderDoc.cpp | Const-me_Whisper/Whisper/D3D/RenderDoc/renderDoc.cpp | #include "stdafx.h"
#include "renderDoc.h"
#include "renderdoc_app.h"
#include "../device.h"
#define ENABLE_RENDERDOC_DEBUGGER 1
#if ENABLE_RENDERDOC_DEBUGGER
namespace
{
static HMODULE hmRenderDoc = nullptr;
static RENDERDOC_API_1_6_0* api = nullptr;
}
bool DirectCompute::initializeRenderDoc()
{
hmRenderDoc = Ge... | 1,400 | C++ | .cpp | 63 | 20.460317 | 97 | 0.738901 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,544 | mulMatImpl.cpp | Const-me_Whisper/Whisper/CPU/mulMatImpl.cpp | #include "stdafx.h"
#include <intrin.h>
#include "mulMatImpl.h"
#include "mulMat.kernel.hpp"
#define DBG_TRACK_TEMPLATE_INSTANTIATION 0
#if DBG_TRACK_TEMPLATE_INSTANTIATION
#include <unordered_set>
static std::unordered_set<uint16_t> g_mulMatTemplates;
#endif
namespace
{
using namespace CpuCompute;
bool checkAvx2... | 7,344 | C++ | .cpp | 190 | 35.994737 | 151 | 0.706254 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,545 | MlContextCpu.cpp | Const-me_Whisper/Whisper/CPU/MlContextCpu.cpp | #include "stdafx.h"
#include "MlContext.h"
#include "simdUtils.h"
#include "mulMat.h"
using namespace CpuCompute;
MlContext::MlContext( int threads ) : pfor( threads )
{
}
Tensor MlContext::createTensor( eDataType type, const std::array<uint32_t, 4>& size )
{
Tensor res;
check( res.create( type, size, allocator ) )... | 16,717 | C++ | .cpp | 523 | 29.231358 | 124 | 0.624899 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,546 | KvTensorsCpu.cpp | Const-me_Whisper/Whisper/CPU/KvTensorsCpu.cpp | #include "stdafx.h"
#include "KvTensors.h"
using namespace CpuCompute;
// Create these two large tensors, FP16 precision
HRESULT KvTensors::create( const Whisper::sModelParams& mp )
{
const uint32_t n_mem = mp.n_text_layer * mp.n_text_ctx;
const uint32_t n_elements = mp.n_text_state * n_mem;
const size_t cb = size... | 529 | C++ | .cpp | 16 | 31.375 | 63 | 0.7182 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,547 | mulMat.cpp | Const-me_Whisper/Whisper/CPU/mulMat.cpp | #include "stdafx.h"
#include "mulMat.h"
#include "mulMatImpl.h"
using namespace CpuCompute;
namespace
{
template<uint8_t panelHeightRegs, uint8_t tileWidthFloats>
static HRESULT mulMatImpl( Tensor& result, const Tensor& a, const Tensor& b, ParallelForRunner& pfor )
{
MulMatImpl<panelHeightRegs, tileWidthFloats> i... | 1,316 | C++ | .cpp | 50 | 23.82 | 103 | 0.638095 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,548 | simdUtils.cpp | Const-me_Whisper/Whisper/CPU/simdUtils.cpp | #include "stdafx.h"
#include "simdUtils.h"
#include "../ML/LookupTablesData.h"
#include <cmath>
#include <memory>
namespace
{
constexpr size_t maskAlign8 = ~(size_t)7;
__forceinline __m256 load8( const uint16_t* rsi )
{
__m128i i = _mm_loadu_si128( ( const __m128i* )rsi );
return _mm256_cvtph_ps( i );
}
__f... | 18,734 | C++ | .cpp | 679 | 24.743741 | 129 | 0.593654 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,549 | BufferAllocator.cpp | Const-me_Whisper/Whisper/CPU/BufferAllocator.cpp | #include <stdafx.h>
#include "BufferAllocator.h"
#include <immintrin.h>
#include <ammintrin.h>
using namespace CpuCompute;
HRESULT BufferAllocator::create( size_t cb )
{
CHECK( buffer.allocate( cb ) );
head = 0;
size = cb;
dbgMarkUninitializedMemory( buffer.pointer(), cb );
return S_OK;
}
namespace
{
// Round u... | 3,412 | C++ | .cpp | 126 | 24.880952 | 101 | 0.716646 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,550 | LargeBuffer.cpp | Const-me_Whisper/Whisper/CPU/LargeBuffer.cpp | #include "stdafx.h"
#include "LargeBuffer.h"
using namespace CpuCompute;
void LargeBuffer::deallocate()
{
if( nullptr == pv )
return;
VirtualFree( pv, 0, MEM_RELEASE );
pv = nullptr;
}
HRESULT LargeBuffer::allocate( size_t cb )
{
deallocate();
pv = VirtualAlloc( nullptr, cb, MEM_COMMIT | MEM_RESERVE, PAGE_RE... | 652 | C++ | .cpp | 30 | 19.733333 | 76 | 0.703883 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,551 | mulMatImpl.panel.cpp | Const-me_Whisper/Whisper/CPU/mulMatImpl.panel.cpp | #include "stdafx.h"
#include <intrin.h>
#include "mulMatImpl.h"
#include "mulMatUtils.hpp"
using namespace CpuCompute;
// We want to keep code size reasonable, that's why these panel reshaping methods are in the base class
HRESULT MulMatBase::transposePanel( uint16_t* rdi, size_t i, size_t m2, size_t m3 ) const
{
ass... | 7,767 | C++ | .cpp | 245 | 29 | 103 | 0.635175 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,552 | DecoderTensors.cpp | Const-me_Whisper/Whisper/CPU/DecoderTensors.cpp | #include "stdafx.h"
#include "DecoderTensors.h"
using namespace CpuCompute;
#if TENSOR_GGML_COMPAT
namespace
{
class CompatContext
{
std::vector<ggml_tensor>& vec;
size_t index;
public:
CompatContext( std::vector<ggml_tensor>& dest, size_t layers ) :
vec( dest )
{
constexpr size_t tensorsPerLayer = 2... | 1,613 | C++ | .cpp | 60 | 24.133333 | 71 | 0.646184 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,553 | HybridLoader.cpp | Const-me_Whisper/Whisper/CPU/HybridLoader.cpp | #include "stdafx.h"
#include "HybridLoader.h"
using namespace CpuCompute;
using namespace ComLight;
static void populateDecodeTensorsMap( CAtlMap<CStringA, Tensor*>& map, int layersDec, DecoderTensors& dec )
{
dec.layers.resize( layersDec );
map[ "decoder.positional_embedding" ] = &dec.positionalEmbedding;
map[ "d... | 4,135 | C++ | .cpp | 114 | 33.842105 | 166 | 0.683433 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,554 | ParallelForRunner.cpp | Const-me_Whisper/Whisper/CPU/ParallelForRunner.cpp | #include "stdafx.h"
#include "ParallelForRunner.h"
using namespace CpuCompute;
ParallelForRunner::ParallelForRunner( int threads ) :
maxThreads( threads )
{
if( maxThreads <= 1 )
{
threadBuffers.resize( 1 );
return;
}
work = CreateThreadpoolWork( &workCallbackStatic, this, nullptr );
if( nullptr == work )
... | 3,170 | C++ | .cpp | 132 | 21.795455 | 120 | 0.713766 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,555 | mulMatImpl.avx2.cpp | Const-me_Whisper/Whisper/CPU/mulMatImpl.avx2.cpp | #include "stdafx.h"
#include "mulMatImpl.h"
#include <immintrin.h>
#include "mulMatUtils.hpp"
using namespace CpuCompute;
namespace
{
constexpr size_t prefetchBytes = 96;
constexpr int prefetchHint = _MM_HINT_T0;
constexpr size_t maskAlign16 = ~(size_t)15;
__forceinline __m256i load( const void* rsi )
{
retur... | 11,828 | C++ | .cpp | 319 | 33.106583 | 149 | 0.596058 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,556 | TensorCpu.cpp | Const-me_Whisper/Whisper/CPU/TensorCpu.cpp | #include <stdafx.h>
#include <atomic>
#include "Tensor.h"
using namespace CpuCompute;
#if TENSOR_INTERNAL_ALLOC
namespace
{
// This structure is immediately before the payload of every tensor which has an internally-allocated memory buffer
class alignas( 32 ) sTensorMemoryHeader
{
std::atomic_ptrdiff_t refCounter... | 9,229 | C++ | .cpp | 354 | 23.830508 | 116 | 0.681844 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,557 | ContextImpl.diarize.cpp | Const-me_Whisper/Whisper/Whisper/ContextImpl.diarize.cpp | #include "stdafx.h"
#include "ContextImpl.h"
using namespace Whisper;
namespace
{
// Offset the timestamp with mediaTimeOffset to find the time relative to the start of the iSpectrogram buffer,
// then scale from 100 nanosecond ticks into the Whisper's 10ms chunks, rounding down
inline int64_t chunkOffset( int64_t ... | 3,802 | C++ | .cpp | 93 | 38.247312 | 149 | 0.69797 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,558 | ModelBuffers.cpp | Const-me_Whisper/Whisper/Whisper/ModelBuffers.cpp | #include "stdafx.h"
#include "ModelLoader.h"
#if BUILD_BOTH_VERSIONS
namespace DirectCompute
{
static ModelBuffers s_model;
const ModelBuffers& gpuModel = s_model;
}
using namespace DirectCompute;
ModelLoader::ModelLoader( int encoderLayers, int decoderLayers ) :
model( s_model )
{
if( encoderLayers <= 0 || dec... | 3,316 | C++ | .cpp | 101 | 31 | 78 | 0.698626 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,559 | DecoderResultBuffer.cpp | Const-me_Whisper/Whisper/Whisper/DecoderResultBuffer.cpp | #include "stdafx.h"
#include "DecoderResultBuffer.h"
#include "../D3D/MappedResource.h"
using namespace DirectCompute;
void DecoderResultBuffer::copyFromVram( const Tensor& rsi )
{
ID3D11ShaderResourceView* srv = rsi;
if( nullptr == srv )
throw OLE_E_BLANK;
if( !rsi.isContinuous() )
throw E_INVALIDARG;
const ... | 1,244 | C++ | .cpp | 42 | 27.642857 | 84 | 0.703425 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,560 | melSpectrogram.cpp | Const-me_Whisper/Whisper/Whisper/melSpectrogram.cpp | #include "stdafx.h"
#include <cmath>
#include "melSpectrogram.h"
namespace Whisper
{
HanningWindow::HanningWindow()
{
for( int i = 0; i < FFT_SIZE; i++ )
{
// TODO [low]: use XMVectorCos instead
hann[ i ] = (float)( 0.5 * ( 1.0 - std::cos( ( 2.0 * M_PI * i ) / ( FFT_SIZE ) ) ) );
}
}
const HanningWindo... | 11,066 | C++ | .cpp | 345 | 29.113043 | 118 | 0.575269 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,561 | WhisperModel.cpp | Const-me_Whisper/Whisper/Whisper/WhisperModel.cpp | #include "stdafx.h"
#include "WhisperModel.h"
#include "loaderUtils.h"
#include "../D3D/createBuffer.h"
#include <atlcoll.h>
#include <atlstr.h>
#include "../Utils/GpuProfilerSimple.h"
#include "../Utils/CpuProfiler.h"
#include "../CPU/HybridLoader.h"
#include "../ML/Reshaper.h"
using namespace Whisper;
using namespace... | 14,185 | C++ | .cpp | 445 | 28.853933 | 174 | 0.681875 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,562 | ContextImpl.capture.cpp | Const-me_Whisper/Whisper/Whisper/ContextImpl.capture.cpp | #include "stdafx.h"
#include "ContextImpl.h"
#include "../API/iMediaFoundation.cl.h"
#include "../MF/AudioBuffer.h"
#include "../MF/mfUtils.h"
#include <mfidl.h>
#include <mfapi.h>
#include <mfreadwrite.h>
#include "voiceActivityDetection.h"
namespace
{
using namespace Whisper;
class TranscribeBuffer : public ComLi... | 12,058 | C++ | .cpp | 375 | 28.658667 | 139 | 0.704749 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,563 | ModelImpl.cpp | Const-me_Whisper/Whisper/Whisper/ModelImpl.cpp | #include "stdafx.h"
#include "ModelImpl.h"
#include "ContextImpl.h"
#include <intrin.h>
#include "../Utils/ReadStream.h"
#include "../modelFactory.h"
using namespace Whisper;
void ModelImpl::FinalRelease()
{
device.destroy();
}
HRESULT COMLIGHTCALL ModelImpl::createContext( iContext** pp )
{
auto ts = device.setFor... | 4,384 | C++ | .cpp | 135 | 30.385185 | 139 | 0.71872 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,564 | Vocabulary.cpp | Const-me_Whisper/Whisper/Whisper/Vocabulary.cpp | #include "stdafx.h"
#include "Vocabulary.h"
#include "loaderUtils.h"
#include <regex>
using ComLight::iReadStream;
using namespace Whisper;
Vocabulary::Vocabulary() :
idFromToken( 17u, 0.75f, 0.25f, 1.5f, 1024 )
{ }
void Vocabulary::addExtra( int index, const char* format, int i )
{
const int len = std::snprintf( n... | 5,263 | C++ | .cpp | 193 | 24.290155 | 166 | 0.635065 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,565 | Spectrogram.cpp | Const-me_Whisper/Whisper/Whisper/Spectrogram.cpp | #include "stdafx.h"
#include "Spectrogram.h"
#include <memory>
#define _USE_MATH_DEFINES
#include <math.h>
#include "../Utils/parallelFor.h"
#include "../API/iMediaFoundation.cl.h"
#include "../ML/testUtils.h"
#include "melSpectrogram.h"
using namespace Whisper;
class alignas( 64 ) Spectrogram::MelContext
{
const flo... | 4,052 | C++ | .cpp | 145 | 25.634483 | 122 | 0.675161 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,566 | DecoderInputBuffers.cpp | Const-me_Whisper/Whisper/Whisper/DecoderInputBuffers.cpp | #include "stdafx.h"
#include "DecoderInputBuffers.h"
#include "../D3D/createBuffer.h"
#include "../D3D/MappedResource.h"
using namespace DirectCompute;
void DecoderInputBuffers::resize( uint32_t size )
{
if( 0 == size )
throw E_INVALIDARG;
if( size <= m_capacity )
{
m_size = size;
return;
}
embd = nullptr... | 1,541 | C++ | .cpp | 62 | 22.709677 | 83 | 0.69215 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,567 | ContextImpl.misc.cpp | Const-me_Whisper/Whisper/Whisper/ContextImpl.misc.cpp | #include "stdafx.h"
#include "ContextImpl.h"
#include <mfapi.h>
#include "MelStreamer.h"
#include "../API/iMediaFoundation.cl.h"
#include "../Utils/Trace/tracing.h"
using namespace Whisper;
static int getCpuCoresCount()
{
DWORD bufferSize = 0;
GetLogicalProcessorInformation( NULL, &bufferSize );
// The SYSTEM_LOGI... | 10,253 | C++ | .cpp | 366 | 25.254098 | 149 | 0.689929 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,568 | KeyValueBuffers.cpp | Const-me_Whisper/Whisper/Whisper/KeyValueBuffers.cpp | #include "stdafx.h"
#include "KeyValueBuffers.h"
#include "../D3D/createBuffer.h"
#include "../ML/mlUtils.h"
using namespace DirectCompute;
void AttentionBuffer::resize( uint32_t size )
{
if( size <= m_size )
return;
buffer = nullptr;
check( createBuffer( eBufferUse::ReadWrite, (size_t)2 * size, &buffer, nullptr... | 1,728 | C++ | .cpp | 58 | 27.827586 | 112 | 0.738397 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,569 | Languages.cpp | Const-me_Whisper/Whisper/Whisper/Languages.cpp | #include "stdafx.h"
#include "Languages.h"
#include <atlcoll.h>
#include "../API/iContext.cl.h"
namespace
{
// These structures are compiled into the DLL, in read only data section
using Lang = Whisper::sLanguageEntry;
static const Lang s_languageData[] =
{
#include "languageCodez.inl"
};
using Whisper::makeLa... | 2,546 | C++ | .cpp | 106 | 21.169811 | 73 | 0.660619 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,570 | MelStreamer.cpp | Const-me_Whisper/Whisper/Whisper/MelStreamer.cpp | #include "stdafx.h"
#include "MelStreamer.h"
#include "../Utils/parallelFor.h"
using namespace Whisper;
MelStreamer::MelStreamer( const Filters& filters, ProfileCollection& prof, const iAudioReader* iar ) :
reader( iar ),
melContext( filters ),
profiler( prof )
{ }
void MelStreamer::dropOldChunks( size_t off )
{
... | 14,108 | C++ | .cpp | 462 | 27.634199 | 145 | 0.679558 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,571 | ModelBuffers.clone.cpp | Const-me_Whisper/Whisper/Whisper/ModelBuffers.clone.cpp | #include <stdafx.h>
#include "ModelBuffers.h"
#include "../ML/mlUtils.h"
namespace
{
using namespace DirectCompute;
HRESULT clone( Tensor& rdi, const Tensor& rsi )
{
CComPtr<ID3D11ShaderResourceView> srv;
CHECK( cloneResourceView( rsi, &srv ) );
rdi = rsi;
rdi.setGpuViews( srv );
return S_OK;
}
HRESU... | 2,730 | C++ | .cpp | 89 | 27.977528 | 69 | 0.679863 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,572 | voiceActivityDetection.cpp | Const-me_Whisper/Whisper/Whisper/voiceActivityDetection.cpp | #include "stdafx.h"
#include "voiceActivityDetection.h"
using namespace Whisper;
// Initially ported (poorly) from there https://github.com/panmasuo/voice-activity-detection MIT license
// The code is based on that article:
// https://www.researchgate.net/publication/255667085_A_simple_but_efficient_real-time_voice_ac... | 5,254 | C++ | .cpp | 178 | 27.005618 | 126 | 0.654653 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,573 | ContextImpl.cpp | Const-me_Whisper/Whisper/Whisper/ContextImpl.cpp | #include "stdafx.h"
#include "ContextImpl.h"
#include "Languages.h"
#include "../Utils/Trace/tracing.h"
using namespace Whisper;
ContextImpl::ContextImpl( const DirectCompute::Device& dev, const WhisperModel& modelData, iModel* modelPointer ) :
device( dev ),
model( modelData ),
modelPtr( modelPointer ),
context( ... | 21,276 | C++ | .cpp | 672 | 27.80506 | 131 | 0.616316 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,574 | MelInputTensor.cpp | Const-me_Whisper/Whisper/Whisper/MelInputTensor.cpp | #include "stdafx.h"
#include "MelInputTensor.h"
#include "../D3D/MappedResource.h"
#include "../D3D/createBuffer.h"
#include <mfapi.h> // MFCopyImage
using namespace DirectCompute;
HRESULT MelInputTensor::create( Whisper::iSpectrogram& spectrogram, const sEncodeParams& encParams )
{
// Ported from the initial portion... | 2,114 | C++ | .cpp | 54 | 36.5 | 100 | 0.698343 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,575 | WhisperContext.cpp | Const-me_Whisper/Whisper/Whisper/WhisperContext.cpp | #include "stdafx.h"
#include "WhisperContext.h"
#include "ModelBuffers.h"
#include <optional>
#include "../Utils/Trace/tracing.h"
#include "../D3D/RenderDoc/renderDoc.h"
#include "../ML/testUtils.h"
using namespace DirectCompute;
namespace
{
// True to measure GPU time of individual shaders which run during the encod... | 19,104 | C++ | .cpp | 593 | 29.676223 | 158 | 0.690099 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,576 | mfUtils.cpp | Const-me_Whisper/Whisper/MF/mfUtils.cpp | #include "stdafx.h"
#include "mfUtils.h"
#include <mfapi.h>
HRESULT Whisper::createMediaType( bool stereo, IMFMediaType** pp )
{
if( nullptr == pp )
return E_POINTER;
CComPtr<IMFMediaType> mt;
CHECK( MFCreateMediaType( &mt ) );
CHECK( mt->SetGUID( MF_MT_MAJOR_TYPE, MFMediaType_Audio ) );
CHECK( mt->SetGUID( MF... | 2,069 | C++ | .cpp | 56 | 34.785714 | 97 | 0.722639 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,577 | AudioCapture.cpp | Const-me_Whisper/Whisper/MF/AudioCapture.cpp | #include "stdafx.h"
#include <atlstr.h>
#include <mfapi.h>
#include <mfidl.h>
#include <mfreadwrite.h>
#include "AudioCapture.h"
#include "../API/iMediaFoundation.cl.h"
#include "../ComLightLib/comLightServer.h"
#pragma comment(lib, "Mf.lib")
namespace
{
struct Strings
{
CString displayName, endpoint;
};
HRESUL... | 4,693 | C++ | .cpp | 143 | 30.041958 | 156 | 0.725425 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,578 | MediaFoundation.cpp | Const-me_Whisper/Whisper/MF/MediaFoundation.cpp | #include "stdafx.h"
#include "../API/iMediaFoundation.cl.h"
#include "mfStartup.h"
#include "../ComLightLib/comLightServer.h"
#include "loadAudioFile.h"
#include <mfidl.h>
#include <mfreadwrite.h>
#include "mfUtils.h"
#include "AudioCapture.h"
#include <mfapi.h>
#include <shlwapi.h>
namespace Whisper
{
class AudioRea... | 4,947 | C++ | .cpp | 155 | 28.529032 | 141 | 0.719732 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,579 | loadAudioFile.cpp | Const-me_Whisper/Whisper/MF/loadAudioFile.cpp | #include "stdafx.h"
#include "../ComLightLib/comLightServer.h"
#include "loadAudioFile.h"
#include "mfUtils.h"
#include "AudioBuffer.h"
#include <mfidl.h>
#include <mfreadwrite.h>
#include <mfapi.h>
#pragma comment(lib, "Mfreadwrite.lib")
#pragma comment(lib, "mfuuid.lib")
namespace Whisper
{
class MediaFileBuffer : ... | 4,129 | C++ | .cpp | 131 | 28.114504 | 125 | 0.693256 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,580 | mfStartup.cpp | Const-me_Whisper/Whisper/MF/mfStartup.cpp | #include "stdafx.h"
#include "mfStartup.h"
#include <atlbase.h>
#include <mfapi.h>
#pragma comment(lib, "Mfplat.lib")
namespace
{
struct sCoInitStatus
{
// Possible state:
// -1 is the initial state, coInitialize never called
// S_OK - CoInitializeEx succeeded, in this state the counter tracks the count of coI... | 2,530 | C++ | .cpp | 113 | 19.530973 | 127 | 0.67875 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,581 | PcmReader.cpp | Const-me_Whisper/Whisper/MF/PcmReader.cpp | #include "stdafx.h"
#include "PcmReader.h"
#include <mfapi.h>
#include <Mferror.h>
#include "mfUtils.h"
namespace Whisper
{
__interface iSampleHandler
{
void copyChunk( PcmMonoChunk* pMono, const AudioBuffer& rsi, size_t sourceOffset, PcmStereoChunk* pStereo ) const;
void moveBufferData( AudioBuffer& rdi, size_t... | 13,138 | C++ | .cpp | 377 | 31.535809 | 146 | 0.700685 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,582 | AudioBuffer.cpp | Const-me_Whisper/Whisper/MF/AudioBuffer.cpp | #include "stdafx.h"
#include "AudioBuffer.h"
using namespace Whisper;
void AudioBuffer::appendMono( const float* rsi, size_t countFloats )
{
mono.insert( mono.end(), rsi, rsi + countFloats );
}
void AudioBuffer::appendStereo( const float* rsi, size_t countFloats )
{
assert( 0 == ( countFloats % 2 ) );
const size_t... | 2,967 | C++ | .cpp | 76 | 36.592105 | 79 | 0.629565 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,584 | KeyValueDownloader.cpp | Const-me_Whisper/Whisper/Hybrid/KeyValueDownloader.cpp | #include "stdafx.h"
#include "KeyValueDownloader.h"
HRESULT KeyValueDownloader::create( const Whisper::sModelParams& mp )
{
const uint32_t n_audio_ctx = mp.n_audio_ctx;
const uint32_t n_mem = mp.n_text_layer * mp.n_audio_ctx;
const uint32_t n_elements = mp.n_text_state * n_mem;
CD3D11_BUFFER_DESC desc{ n_elements... | 1,030 | C++ | .cpp | 27 | 36.407407 | 90 | 0.742743 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,585 | HybridContext.cpp | Const-me_Whisper/Whisper/Hybrid/HybridContext.cpp | #include "stdafx.h"
#include <immintrin.h>
#include <optional>
#include "HybridContext.h"
#include "../Utils/Trace/tracing.h"
#if BUILD_HYBRID_VERSION
#ifndef __AVX__
#error Hybrid version requires AVX build, and ideally AVX2 CPU
#endif // !__AVX__
namespace
{
int threadsCount( int t )
{
#ifdef NDEBUG
if( t == 0 ... | 9,408 | C++ | .cpp | 301 | 28.199336 | 137 | 0.662102 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,587 | ProfileCollection.cpp | Const-me_Whisper/Whisper/Utils/ProfileCollection.cpp | #include "stdafx.h"
#include "ProfileCollection.h"
#include "GpuProfiler.h"
#include "../Whisper/WhisperModel.h"
#include "../D3D/shaderNames.h"
using namespace Whisper;
ProfileCollection::Measure& ProfileCollection::measure( DirectCompute::eProfilerBlock which )
{
uint32_t key = (uint16_t)which;
key |= 0x20000;
re... | 7,794 | C++ | .cpp | 305 | 22.613115 | 133 | 0.665997 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,588 | miscUtils.cpp | Const-me_Whisper/Whisper/Utils/miscUtils.cpp | #include "stdafx.h"
#include "miscUtils.h"
#include <cmath>
void setCurrentThreadName( const char* threadName )
{
const DWORD dwThreadID = GetCurrentThreadId();
// https://stackoverflow.com/a/10364541/126995
#pragma pack(push,8)
typedef struct tagTHREADNAME_INFO
{
DWORD dwType; // Must be 0x1000.
LPCSTR ... | 1,520 | C++ | .cpp | 52 | 27.307692 | 96 | 0.677596 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,589 | Logger.cpp | Const-me_Whisper/Whisper/Utils/Logger.cpp | #include "stdafx.h"
#include "Logger.h"
#include "../API/iContext.cl.h"
#include <cstdarg>
#include <atlstr.h>
namespace
{
wchar_t* formatMessage( HRESULT hr )
{
wchar_t* err;
if( FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
hr,
MAKELANGID( LANG_NEUTRAL, SUBLANG_DEFA... | 5,782 | C++ | .cpp | 220 | 23.390909 | 105 | 0.640808 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,590 | parallelFor.cpp | Const-me_Whisper/Whisper/Utils/parallelFor.cpp | #include "stdafx.h"
#include "parallelFor.h"
namespace
{
class alignas( 64 ) ParallelForContext
{
volatile long threadIndex;
volatile HRESULT status;
alignas( 64 ) void* const context;
const Whisper::pfnParallelForCallback pfn;
static void __stdcall callbackStatic( PTP_CALLBACK_INSTANCE Instance, PVOID p... | 3,154 | C++ | .cpp | 116 | 24.517241 | 109 | 0.726005 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,591 | GpuProfiler.cpp | Const-me_Whisper/Whisper/Utils/GpuProfiler.cpp | #include "stdafx.h"
#include "GpuProfiler.h"
#include "GpuProfilerSimple.h"
using namespace DirectCompute;
inline void GpuProfiler::sProfilerData::reset()
{
_mm_storeu_si128( ( __m128i* ) & callsPending, _mm_setzero_si128() );
}
inline void GpuProfiler::sProfilerData::addPending( int64_t time )
{
callsPending++;
t... | 9,243 | C++ | .cpp | 328 | 25.911585 | 185 | 0.714592 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,592 | CpuProfiler.cpp | Const-me_Whisper/Whisper/Utils/CpuProfiler.cpp | #include "stdafx.h"
#include "CpuProfiler.h"
namespace
{
using namespace Whisper;
inline int64_t qpcNow()
{
int64_t res;
QueryPerformanceCounter( (LARGE_INTEGER*)&res );
return res;
}
class CpuTimescale
{
uint64_t frequency = 0;
const int64_t tscStart;
const int64_t qpcStart;
uint64_t computeTsc... | 1,297 | C++ | .cpp | 52 | 22.134615 | 89 | 0.689376 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,593 | DelayExecution.cpp | Const-me_Whisper/Whisper/Utils/DelayExecution.cpp | #include "stdafx.h"
#include "DelayExecution.h"
namespace
{
constexpr bool useHighRezTimer = false;
constexpr int64_t sleepMicroseconds = 200;
inline HRESULT sleepImpl( HANDLE timer )
{
constexpr int64_t sleepTicks = sleepMicroseconds * 10;
LARGE_INTEGER li;
// Negative values indicate relative time
li.... | 1,429 | C++ | .cpp | 56 | 23.125 | 80 | 0.722141 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,594 | TraceWriter.cpp | Const-me_Whisper/Whisper/Utils/Trace/TraceWriter.cpp | #include "stdafx.h"
#include "TraceWriter.h"
#include <atlfile.h>
#include <atlcoll.h>
#include <atlstr.h>
#include "TraceStructures.h"
#include "../../ML/Tensor.h"
#include "../../CPU/Tensor.h"
#include <Shlobj.h>
using namespace Tracing;
namespace
{
static HRESULT createDir( LPCTSTR pathFile )
{
LPCWSTR fn = Pat... | 6,746 | C++ | .cpp | 229 | 26.554585 | 117 | 0.686305 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,595 | tracing.cpp | Const-me_Whisper/Whisper/Utils/Trace/tracing.cpp | #include "stdafx.h"
#include "tracing.h"
#include "../../source/ggml.h"
#include "../../ML/Tensor.h"
namespace Tracing
{
#if SAVE_DEBUG_TRACE
std::unique_ptr<iTraceWriter> s_writer;
static BOOL __stdcall consoleHandler( DWORD dwCtrlType )
{
if( dwCtrlType == CTRL_C_EVENT )
s_writer = nullptr;
// Return TRU... | 1,490 | C++ | .cpp | 61 | 21.918033 | 101 | 0.70936 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,596 | TraceStructures.cpp | Const-me_Whisper/Whisper/Utils/Trace/TraceStructures.cpp | #include "stdafx.h"
#include "TraceStructures.h"
using namespace Tracing;
uint64_t sTraceItem::buffer( uint64_t off, size_t length, eDataType type )
{
payloadOffset = off;
payloadSize = length * DirectCompute::elementSize( type );
*(uint64_t*)( &size[ 0 ] ) = length;
*(uint64_t*)( &size[ 2 ] ) = 0;
_mm_storeu_si1... | 865 | C++ | .cpp | 28 | 29.035714 | 83 | 0.681437 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,597 | Context.ops.cpp | Const-me_Whisper/Whisper/ML/Context.ops.cpp | #include "stdafx.h"
#include "MlContext.h"
#include "testUtils.h"
using namespace DirectCompute;
Tensor MlContext::createTensor( eDataType type, const std::array<uint32_t, 4>& ne )
{
Tensor res;
check( res.create( type, ne ) );
return res;
}
Tensor MlContext::createTensor( eDataType type, std::initializer_list<uin... | 7,158 | C++ | .cpp | 249 | 26.485944 | 125 | 0.640256 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,598 | ConstantBuffer.cpp | Const-me_Whisper/Whisper/ML/ConstantBuffer.cpp | #include "stdafx.h"
#include "ConstantBuffer.h"
#include "../D3D/MappedResource.h"
using namespace DirectCompute;
HRESULT ConstantBuffer::create()
{
if( nullptr == buffer )
{
CD3D11_BUFFER_DESC desc{ 16 * 3 * 2, D3D11_BIND_CONSTANT_BUFFER, D3D11_USAGE_DYNAMIC, D3D11_CPU_ACCESS_WRITE };
return device()->CreateBuf... | 1,491 | C++ | .cpp | 54 | 25.796296 | 113 | 0.701889 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,599 | TensorEx.cpp | Const-me_Whisper/Whisper/ML/TensorEx.cpp | #include "stdafx.h"
#include "TensorEx.h"
#include "../D3D/createBuffer.h"
#include "../source/ggml.h"
#include "../D3D/MappedResource.h"
using namespace DirectCompute;
HRESULT TensorEx::create( const ggml_tensor& ggml, eBufferUse usage, bool uploadData )
{
TensorGpuViews::clear();
buffer = nullptr;
stagingBuffer =... | 2,836 | C++ | .cpp | 78 | 34.25641 | 129 | 0.74708 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,600 | testUtils.cpp | Const-me_Whisper/Whisper/ML/testUtils.cpp | #include "stdafx.h"
#include "testUtils.h"
#include <immintrin.h>
#include <atlfile.h>
#include <atlpath.h>
namespace
{
using DirectCompute::sTensorDiff;
__forceinline __m256 load( const float* rsi )
{
return _mm256_loadu_ps( rsi );
}
__forceinline __m256 load( const uint16_t* rsi )
{
const __m128i iv = _m... | 8,858 | C++ | .cpp | 295 | 27.223729 | 112 | 0.61246 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,601 | LookupTablesData.cpp | Const-me_Whisper/Whisper/ML/LookupTablesData.cpp | #include "stdafx.h"
#include "LookupTablesData.h"
#include <immintrin.h>
#include <atlfile.h>
#include <Utils/LZ4/lz4.h>
using namespace DirectCompute;
namespace
{
inline float fp32( uint16_t f16 )
{
__m128i i = _mm_cvtsi32_si128( f16 );
__m128 f = _mm_cvtph_ps( i );
return _mm_cvtss_f32( f );
}
inline uint... | 1,814 | C++ | .cpp | 63 | 26.857143 | 124 | 0.684814 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,602 | Device.cpp | Const-me_Whisper/Whisper/ML/Device.cpp | #include "stdafx.h"
#include "Device.h"
#include "../D3D/createDevice.h"
#include "../D3D/shaders.h"
#include "../D3D/device.h"
#include "mlUtils.h"
#include "../D3D/MappedResource.h"
using namespace DirectCompute;
HRESULT Device::create( uint32_t flags, const std::wstring& adapter )
{
CHECK( validateFlags( flags ) ... | 3,823 | C++ | .cpp | 151 | 23.317881 | 105 | 0.725802 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,603 | TensorsArena.cpp | Const-me_Whisper/Whisper/ML/TensorsArena.cpp | #include "stdafx.h"
#include "TensorsArena.h"
#include "../D3D/createBuffer.h"
#include "mlUtils.h"
static inline uint32_t roundUpPower2( uint32_t x )
{
// std::bit_ceil from C++/20 standard library implements runtime dispatch, uses LZCNT when AVX2 is available, otherwise BSR
// That's not what we want.
// BSR is o... | 4,204 | C++ | .cpp | 142 | 27.570423 | 124 | 0.721259 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,604 | MlContext.dbg.cpp | Const-me_Whisper/Whisper/ML/MlContext.dbg.cpp | #include "stdafx.h"
#include "MlContext.h"
#include "../source/ggml.h"
#include "testUtils.h"
using namespace DirectCompute;
#define E_TYPE HRESULT_FROM_WIN32( ERROR_DATATYPE_MISMATCH )
static void dbgPrintSizeDiff( const char* what, __m128i ref, __m128i gpu )
{
std::array<int, 8> a;
_mm_storeu_si128( ( __m128i* ) ... | 1,903 | C++ | .cpp | 51 | 35.019608 | 148 | 0.663957 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,605 | MlContext.cpp | Const-me_Whisper/Whisper/ML/MlContext.cpp | #include "stdafx.h"
#include "MlContext.h"
#include "../D3D/shaderNames.h"
#include "LookupTables.h"
#include "../D3D/shaders.h"
#include "../D3D/Binder.h"
#include "../D3D/MappedResource.h"
#include "../D3D/downloadBuffer.h"
#include "testUtils.h"
#include "reshapedMultiply.h"
using namespace DirectCompute;
// TODO: ... | 20,097 | C++ | .cpp | 629 | 29.600954 | 161 | 0.686305 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
18,606 | Reshaper.cpp | Const-me_Whisper/Whisper/ML/Reshaper.cpp | #include "stdafx.h"
#include "Reshaper.h"
#include "../D3D/MappedResource.h"
#include "../D3D/Binder.h"
#include "../D3D/shaders.h"
#include "reshapedMultiply.h"
namespace
{
using namespace DirectCompute;
struct Constants
{
// Size and strides of the source tensor
TensorShape arg0;
uint32_t zzPadding;
// Co... | 2,102 | C++ | .cpp | 68 | 28.691176 | 105 | 0.711672 | Const-me/Whisper | 8,145 | 691 | 142 | MPL-2.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.