Skip to content

Commit

Permalink
Project structure reorg
Browse files Browse the repository at this point in the history
Progress towards CMake build
  • Loading branch information
ToddThomson committed Jan 9, 2025
1 parent bd7c539 commit 084dded
Show file tree
Hide file tree
Showing 24 changed files with 22 additions and 38 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 4 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ set(CMAKE_CUDA_STANDARD 20)

option(MILA_ENABLE_TESTING "Enable Mila Library tests." "ON")
option(MILA_ENABLE_GPT2_TESTING "Enable GPT2 tests." "OFF")
option(MILA_ENABLE_EXAMPLES "Enable Mila Library examples." "ON")
option(MILA_ENABLE_SAMPLES "Enable Mila Library samples." "ON")
option(MILA_ENABLE_NVBENCH "Enable NvBench." "OFF")
option(MILA_ENABLE_OPENMP "Enable OpenMP support." "OFF")

Expand All @@ -38,23 +38,17 @@ endif()
# The Mila library
add_subdirectory( Mila )

add_executable(train_gpt2 train_gpt2.cpp )
target_include_directories(train_gpt2 PRIVATE dev)
target_link_libraries(train_gpt2 PRIVATE CUDA::nvml CUDA::cublas CUDA::cublasLt)
target_link_libraries(train_gpt2 ${CUDA_LIBRARIES})
#target_compile_options(train_gpt2cu PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:-O3 --use_fast_math --extended-lambda>)

enable_testing()

# Add MilaTest directory
if (MILA_ENABLE_TESTING)
add_subdirectory(Mila/Tests)
endif()

if (MILA_ENABLE_EXAMPLES)
add_subdirectory(Examples)
if (MILA_ENABLE_SAMPLES)
add_subdirectory(Mila/Samples)
endif()

if (MILA_ENABLE_NVBENCH )
#add_subdirectory( Benches )
add_subdirectory( Benches )
endif()
File renamed without changes.
2 changes: 1 addition & 1 deletion License.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2021..2022 Todd J. Thomson
Copyright (c) 2021..2025 Todd J. Thomson

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

# Add executable
add_executable( Gpt2App
"TrainGpt2.cpp"
"Src/TrainGpt2.cpp"
)

target_sources( Gpt2App
PUBLIC
FILE_SET module_files
TYPE CXX_MODULES FILES
"ModelConfig.ixx"
"Gpt2DataLoader.ixx"
"Gpt2Model.ixx"
"Tokenizer.ixx"
"Src/ModelConfig.ixx"
"Src/Gpt2DataLoader.ixx"
"Src/Gpt2Model.ixx"
"Src/Tokenizer.ixx"
)

target_link_libraries( Gpt2App PUBLIC Mila Thrust::Thrust )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module;
#include <array>
#include <iostream>

#include "../../Mila/Src/Core/rand.h"
#include "../../../Src/Core/rand.h"

export module Gpt2.DataLoader;

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion Mila/Src/Mila.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ export namespace Mila {
/// Gets the Mila API version.
/// </summary>
export Version GetAPIVersion() {
return Version{0, 9, 13};
return Version{0, 9, 15};
}
}
30 changes: 10 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,31 @@
Mila Deep Neural Net library

## Prerelease Notice
Mila, version 0.9.5-alpha is currently an early, experimental, preview release.
Mila, version 0.9.15-alpha is currently an early, experimental, preview release.

## Description
Achilles Mila Deep Neural Network library provides an API to model, train and evaluate
Recurrent Neural Networks. Mila utilizes the NVIDIA CUDA runtime and the CuDNN library
for high-performance GPU acceleration.
Deep Neural Networks. Mila utilizes the NVIDIA CUDA runtime for high-performance GPU acceleration.

## Top Features
1 Deep Neural Nets
* Recurrent Neural Networks
* GPU acceleration using CUDA runtime 11.6.x and CuDNN 8.3.2.x
* Fluent configuration of descriptors and operations
* GPT2, Recurrent Neural Networks
* GPU acceleration using CUDA runtime

2 Datasets
* Batch sequence loader
* One-hot encoder
* HDF5 storage
*

## What's New

Mila, Version 0.9.5-alpha adds:
* CUDA Runtime 11.6
* CuDNN 8.3.2.44

Mila, version 0.9.2-pre adds:
* simpified modular API calls
* additional sample code
*
Mila, Version 0.9.15-alpha adds:
* CUDA Runtime 12.6
* NVidia Thrust latest

## Mila Build Instructions
Mila is currently built using Microsoft Visual Studio 2022.
Mila is transitioning to use CMake build.

## Required Components
* C++ 20 Module API
* NVIDIA CuDNN, 8.3.2.x
* NVIDIA Cuda Runtime, 11.6.x
* HDF5, 1.12.1
* NVIDIA Cuda Runtime, 12.6.x

0 comments on commit 084dded

Please sign in to comment.