This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
macro(find_openssl_libraries) | |
if (APPLE) | |
# If we're on OS X check for Homebrew's copy of OpenSSL instead of Apple's | |
if (NOT OpenSSL_DIR) | |
find_program(HOMEBREW brew) | |
if (HOMEBREW STREQUAL "HOMEBREW-NOTFOUND") | |
message(WARNING "Homebrew not found: not using Homebrew's OpenSSL") | |
if (NOT OPENSSL_ROOT_DIR) | |
message(WARNING "Use -DOPENSSL_ROOT_DIR for non-Apple OpenSSL") | |
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get all propreties that cmake supports | |
if(NOT CMAKE_PROPERTY_LIST) | |
execute_process(COMMAND cmake --help-property-list OUTPUT_VARIABLE CMAKE_PROPERTY_LIST) | |
# Convert command output into a CMake list | |
string(REGEX REPLACE ";" "\\\\;" CMAKE_PROPERTY_LIST "${CMAKE_PROPERTY_LIST}") | |
string(REGEX REPLACE "\n" ";" CMAKE_PROPERTY_LIST "${CMAKE_PROPERTY_LIST}") | |
endif() | |
list(APPEND CMAKE_PROPERTY_LIST "IMPORTED_LOCATION") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function(print_cmake_variables) | |
get_cmake_property(_variableNames VARIABLES) | |
list (SORT _variableNames) | |
foreach (_variableName ${_variableNames}) | |
if (ARGV0) | |
unset(MATCHED) | |
string(REGEX MATCH ${ARGV0} MATCHED ${_variableName}) | |
if (NOT MATCHED) | |
continue() | |
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <typename U> | |
struct A_trait { | |
using T = int; | |
}; | |
template <typename U, template <typename ...> class Trait = A_trait> | |
struct A { | |
using T = typename Trait<U>::T; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat /proc/config.gz | gunzip |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GPTModel: | |
def __init__( | |
self, | |
name: str = None, | |
vocab_size: int = 51200, | |
sequence_length: int = 2048, | |
attention_heads: int = 32, | |
hidden_size: int = 2304, | |
layers: int = 24, | |
micro_batch_size: int = 1, |
OlderNewer