Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code format #486

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CUDADataFormats/EcalRecHitSoA/interface/EcalRecHit_soa.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ namespace ecal {

typename type_wrapper<reco::StorageScalarType, L>::type energy;
typename type_wrapper<reco::StorageScalarType, L>::type time;
typename type_wrapper<reco::StorageScalarType, L>::type chi2; // should we remove this, since already included in "extra" ?
typename type_wrapper<reco::StorageScalarType, L>::type
chi2; // should we remove this, since already included in "extra" ?
makortel marked this conversation as resolved.
Show resolved Hide resolved
typename type_wrapper<uint32_t, L>::type extra; // packed uint32_t for timeError, chi2, energyError
typename type_wrapper<uint32_t, L>::type flagBits; // store rechit condition (see Flags enum) in a bit-wise way

Expand Down
12 changes: 9 additions & 3 deletions EventFilter/HcalRawToDigi/plugins/HcalDigisProducerGPU.cc
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,20 @@ HcalDigisProducerGPU::HcalDigisProducerGPU(const edm::ParameterSet& ps)
edm::Service<CUDAService> cs;
if (cs and cs->enabled()) {
// allocate on the device
cudaCheck(cudaMalloc((void**)&df01_.data, config_.maxChannelsF01HE * sizeof(uint16_t) * hcal::compute_stride<hcal::Flavor01>(config_.nsamplesF01HE)));
cudaCheck(cudaMalloc(
(void**)&df01_.data,
config_.maxChannelsF01HE * sizeof(uint16_t) * hcal::compute_stride<hcal::Flavor01>(config_.nsamplesF01HE)));
cudaCheck(cudaMalloc((void**)&df01_.ids, config_.maxChannelsF01HE * sizeof(uint32_t)));

cudaCheck(cudaMalloc((void**)&df5_.data, config_.maxChannelsF5HB * sizeof(uint16_t) * hcal::compute_stride<hcal::Flavor5>(config_.nsamplesF5HB)));
cudaCheck(cudaMalloc(
(void**)&df5_.data,
config_.maxChannelsF5HB * sizeof(uint16_t) * hcal::compute_stride<hcal::Flavor5>(config_.nsamplesF5HB)));
cudaCheck(cudaMalloc((void**)&df5_.ids, config_.maxChannelsF5HB * sizeof(uint32_t)));
cudaCheck(cudaMalloc((void**)&df5_.npresamples, sizeof(uint8_t) * config_.maxChannelsF5HB));

cudaCheck(cudaMalloc((void**)&df3_.data, config_.maxChannelsF3HB * sizeof(uint16_t) * hcal::compute_stride<hcal::Flavor3>(config_.nsamplesF3HB)));
cudaCheck(cudaMalloc(
(void**)&df3_.data,
config_.maxChannelsF3HB * sizeof(uint16_t) * hcal::compute_stride<hcal::Flavor3>(config_.nsamplesF3HB)));
cudaCheck(cudaMalloc((void**)&df3_.ids, config_.maxChannelsF3HB * sizeof(uint32_t)));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,21 +368,21 @@ int main(int argc, char *argv[]) {
stats->SetY2NDC(y1);
stats->SetY1NDC(y1 - (y2 - y1));
}

c.cd(2);
gPad->SetGrid();
hSOIAmplitudesEBGPUvsCPU->Draw("COLZ");

c.cd(5);
gPad->SetGrid();
hSOIAmplitudesEEGPUvsCPU->Draw("COLZ");

c.cd(3);

hSOIAmplitudesEBGPUCPUratio->Draw("");

c.cd(6);

hSOIAmplitudesEEGPUCPUratio->Draw("");

c.SaveAs("ecal-amplitudes.root");
Expand All @@ -406,7 +406,7 @@ int main(int argc, char *argv[]) {
stats->SetY2NDC(y1);
stats->SetY1NDC(y1 - (y2 - y1));
}

c.cd(4);
{
gPad->SetLogy();
Expand All @@ -423,29 +423,28 @@ int main(int argc, char *argv[]) {
stats->SetY2NDC(y1);
stats->SetY1NDC(y1 - (y2 - y1));
}

c.cd(2);
gPad->SetGrid();
hChi2EBGPUvsCPU->Draw("COLZ");

c.cd(5);
gPad->SetGrid();
hChi2EEGPUvsCPU->Draw("COLZ");

c.cd(3);

hChi2EBGPUCPUratio->Draw("");

c.cd(6);

hChi2EEGPUCPUratio->Draw("");

c.SaveAs("ecal-chi2.root");
c.SaveAs("ecal-chi2.png");

// flags


c.cd(1);
{
gPad->SetLogy();
Expand All @@ -462,7 +461,7 @@ int main(int argc, char *argv[]) {
stats->SetY2NDC(y1);
stats->SetY1NDC(y1 - (y2 - y1));
}

c.cd(4);
{
gPad->SetLogy();
Expand All @@ -479,19 +478,18 @@ int main(int argc, char *argv[]) {
stats->SetY2NDC(y1);
stats->SetY1NDC(y1 - (y2 - y1));
}

c.cd(2);
gPad->SetGrid();
hFlagsEBGPUvsCPU->Draw("COLZ");

c.cd(5);
gPad->SetGrid();
hFlagsEEGPUvsCPU->Draw("COLZ");

c.cd(3);
hFlagsEBGPUCPUratio->Draw("");


c.cd(6);
hFlagsEEGPUCPUratio->Draw("");

Expand Down
1 change: 0 additions & 1 deletion RecoLocalCalo/HcalRecProducers/src/MahiGPU.cu
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#include "MahiGPU.h"


#ifdef HCAL_MAHI_GPUDEBUG
#define DETID_TO_DEBUG 1125647428
#endif
Expand Down