-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update TensorRT-LLM --------- Co-authored-by: Kota Tsuyuzaki <[email protected]> Co-authored-by: Pzzzzz <[email protected]> Co-authored-by: Patrick Reiter Horn <[email protected]>
- Loading branch information
1 parent
b777bd6
commit db4edea
Showing
301 changed files
with
556,832 additions
and
523,784 deletions.
There are no files selected for viewing
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#include <algorithm> | ||
#include <cuda_runtime.h> | ||
#include <iomanip> | ||
#include <iostream> | ||
#include <vector> | ||
|
||
int main(int argc, char* argv[]) | ||
{ | ||
int n_devices = 0; | ||
int rc = cudaGetDeviceCount(&n_devices); | ||
if (rc != cudaSuccess) | ||
{ | ||
cudaError_t error = cudaGetLastError(); | ||
std::cout << "CUDA error: " << cudaGetErrorString(error) << std::endl; | ||
return rc; | ||
} | ||
|
||
std::vector<std::pair<int, int>> arch(n_devices); | ||
for (int cd = 0; cd < n_devices; ++cd) | ||
{ | ||
cudaDeviceProp dev; | ||
int rc = cudaGetDeviceProperties(&dev, cd); | ||
if (rc != cudaSuccess) | ||
{ | ||
cudaError_t error = cudaGetLastError(); | ||
std::cout << "CUDA error: " << cudaGetErrorString(error) << std::endl; | ||
return rc; | ||
} | ||
else | ||
{ | ||
arch[cd] = {dev.major, dev.minor}; | ||
} | ||
} | ||
|
||
std::pair<int, int> best_cc = *std::max_element(begin(arch), end(arch)); | ||
std::cout << best_cc.first << best_cc.second; | ||
|
||
return 0; | ||
} |
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
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
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
Oops, something went wrong.